Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR eventhub/resource-manager] EventHub: 2018-preview - added new API for NetworkRuleSet #2725

Merged
merged 4 commits into from
Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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