Skip to content

Commit

Permalink
[AutoPR eventhub/resource-manager] EventHub: 2018-preview - added new…
Browse files Browse the repository at this point in the history
… API for NetworkRuleSet (#2725)

* Generated from 7807c4f0b823166755d145a5f08b2d7b411ebf16

added new NetworkRule APIs

* Generated from a60b308c030848d00a8d37f366a7928eb7d65519

fixed lint errors

* Generated from 3b57de76c54b7554936ce1be5479976688f6f166

fixed typo and updated examples files names for NetworkRuleSets

* Generated from 7d461b5736f870e85cbc48bbb9973536e495301f

updated resource type name in url with plural and lowerCamelCase
  • Loading branch information
AutorestCI authored Dec 14, 2018
1 parent 6c56e3e commit ded293a
Show file tree
Hide file tree
Showing 14 changed files with 923 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.eventhub.v2018_01_01_preview;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for DefaultAction.
*/
public final class DefaultAction extends ExpandableStringEnum<DefaultAction> {
/** Static value Allow for DefaultAction. */
public static final DefaultAction ALLOW = fromString("Allow");

/** Static value Deny for DefaultAction. */
public static final DefaultAction DENY = fromString("Deny");

/**
* Creates or finds a DefaultAction from its string representation.
* @param name a name to look for
* @return the corresponding DefaultAction
*/
@JsonCreator
public static DefaultAction fromString(String name) {
return fromString(name, DefaultAction.class);
}

/**
* @return known DefaultAction values
*/
public static Collection<DefaultAction> values() {
return values(DefaultAction.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.eventhub.v2018_01_01_preview;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The response from the List namespace operation.
*/
public class NWRuleSetIpRules {
/**
* IP Mask.
*/
@JsonProperty(value = "ipMask")
private String ipMask;

/**
* The IP Filter Action. Possible values include: 'Allow'.
*/
@JsonProperty(value = "action")
private NetworkRuleIPAction action;

/**
* Get iP Mask.
*
* @return the ipMask value
*/
public String ipMask() {
return this.ipMask;
}

/**
* Set iP Mask.
*
* @param ipMask the ipMask value to set
* @return the NWRuleSetIpRules object itself.
*/
public NWRuleSetIpRules withIpMask(String ipMask) {
this.ipMask = ipMask;
return this;
}

/**
* Get the IP Filter Action. Possible values include: 'Allow'.
*
* @return the action value
*/
public NetworkRuleIPAction action() {
return this.action;
}

/**
* Set the IP Filter Action. Possible values include: 'Allow'.
*
* @param action the action value to set
* @return the NWRuleSetIpRules object itself.
*/
public NWRuleSetIpRules withAction(NetworkRuleIPAction action) {
this.action = action;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.eventhub.v2018_01_01_preview;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The response from the List namespace operation.
*/
public class NWRuleSetVirtualNetworkRules {
/**
* Subnet properties.
*/
@JsonProperty(value = "subnet")
private Subnet subnet;

/**
* Value that indicates whether to ignore missing Vnet Service Endpoint.
*/
@JsonProperty(value = "ignoreMissingVnetServiceEndpoint")
private Boolean ignoreMissingVnetServiceEndpoint;

/**
* Get subnet properties.
*
* @return the subnet value
*/
public Subnet subnet() {
return this.subnet;
}

/**
* Set subnet properties.
*
* @param subnet the subnet value to set
* @return the NWRuleSetVirtualNetworkRules object itself.
*/
public NWRuleSetVirtualNetworkRules withSubnet(Subnet subnet) {
this.subnet = subnet;
return this;
}

/**
* Get value that indicates whether to ignore missing Vnet Service Endpoint.
*
* @return the ignoreMissingVnetServiceEndpoint value
*/
public Boolean ignoreMissingVnetServiceEndpoint() {
return this.ignoreMissingVnetServiceEndpoint;
}

/**
* Set value that indicates whether to ignore missing Vnet Service Endpoint.
*
* @param ignoreMissingVnetServiceEndpoint the ignoreMissingVnetServiceEndpoint value to set
* @return the NWRuleSetVirtualNetworkRules object itself.
*/
public NWRuleSetVirtualNetworkRules withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMissingVnetServiceEndpoint) {
this.ignoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.microsoft.azure.management.eventhub.v2018_01_01_preview.IpFilterRule;
import rx.Completable;
import com.microsoft.azure.management.eventhub.v2018_01_01_preview.VirtualNetworkRule;
import com.microsoft.azure.management.eventhub.v2018_01_01_preview.implementation.NetworkRuleSetInner;

/**
* Type representing Namespaces.
Expand Down Expand Up @@ -103,4 +104,25 @@ public interface Namespaces extends SupportsCreating<EHNamespace.DefinitionStage
*/
Completable deleteVirtualNetworkRuleAsync(String resourceGroupName, String namespaceName, String virtualNetworkRuleName);

/**
* Create or update NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the Azure subscription.
* @param namespaceName The Namespace name
* @param parameters The Namespace IpFilterRule.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<NetworkRuleSet> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters);

/**
* Gets NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the Azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<NetworkRuleSet> getNetworkRuleSetAsync(String resourceGroupName, String namespaceName);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.eventhub.v2018_01_01_preview;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for NetworkRuleIPAction.
*/
public final class NetworkRuleIPAction extends ExpandableStringEnum<NetworkRuleIPAction> {
/** Static value Allow for NetworkRuleIPAction. */
public static final NetworkRuleIPAction ALLOW = fromString("Allow");

/**
* Creates or finds a NetworkRuleIPAction from its string representation.
* @param name a name to look for
* @return the corresponding NetworkRuleIPAction
*/
@JsonCreator
public static NetworkRuleIPAction fromString(String name) {
return fromString(name, NetworkRuleIPAction.class);
}

/**
* @return known NetworkRuleIPAction values
*/
public static Collection<NetworkRuleIPAction> values() {
return values(NetworkRuleIPAction.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.eventhub.v2018_01_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.eventhub.v2018_01_01_preview.implementation.EventHubManager;
import com.microsoft.azure.management.eventhub.v2018_01_01_preview.implementation.NetworkRuleSetInner;
import java.util.List;

/**
* Type representing NetworkRuleSet.
*/
public interface NetworkRuleSet extends HasInner<NetworkRuleSetInner>, HasManager<EventHubManager> {
/**
* @return the defaultAction value.
*/
DefaultAction defaultAction();

/**
* @return the id value.
*/
String id();

/**
* @return the ipRules value.
*/
List<NWRuleSetIpRules> ipRules();

/**
* @return the name value.
*/
String name();

/**
* @return the type value.
*/
String type();

/**
* @return the virtualNetworkRules value.
*/
List<NWRuleSetVirtualNetworkRules> virtualNetworkRules();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.eventhub.v2018_01_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.eventhub.v2018_01_01_preview.implementation.EventHubManager;
import com.microsoft.azure.management.eventhub.v2018_01_01_preview.implementation.NetworkRuleSetsInner;
import java.util.List;

/**
* Type representing NetworkRuleSets.
*/
public interface NetworkRuleSets extends HasInner<NetworkRuleSetsInner>, HasManager<EventHubManager> {
/**
* @return the defaultAction value.
*/
DefaultAction defaultAction();

/**
* @return the id value.
*/
String id();

/**
* @return the ipRules value.
*/
List<NWRuleSetIpRules> ipRules();

/**
* @return the name value.
*/
String name();

/**
* @return the type value.
*/
String type();

/**
* @return the virtualNetworkRules value.
*/
List<NWRuleSetVirtualNetworkRules> virtualNetworkRules();

}
Loading

0 comments on commit ded293a

Please sign in to comment.