Skip to content
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
Expand Up @@ -50,6 +50,11 @@ public interface CognitiveServicesAccount extends HasInner<CognitiveServicesAcco
*/
String kind();

/**
* @return the networkAcls value.
*/
NetworkRuleSet networkAcls();

/**
* @return the provisioningState value.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* 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.cognitiveservices.v2017_04_18;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* A rule governing the accessibility from a specific ip address or ip range.
*/
public class IPRule {
/**
* An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple
* IP address) or '124.56.78.0/24' (all addresses that start with
* 124.56.78).
*/
@JsonProperty(value = "value", required = true)
private String value;

/**
* Get an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
*
* @return the value value
*/
public String value() {
return this.value;
}

/**
* Set an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
*
* @param value the value value to set
* @return the IPRule object itself.
*/
public IPRule withValue(String value) {
this.value = value;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* 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.cognitiveservices.v2017_04_18;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* A rule governing the accessibility from a specific ip address or ip range.
*/
public class IpRule {
/**
* An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple
* IP address) or '124.56.78.0/24' (all addresses that start with
* 124.56.78).
*/
@JsonProperty(value = "value", required = true)
private String value;

/**
* Get an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
*
* @return the value value
*/
public String value() {
return this.value;
}

/**
* Set an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
*
* @param value the value value to set
* @return the IpRule object itself.
*/
public IpRule withValue(String value) {
this.value = value;
return this;
}

}
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.cognitiveservices.v2017_04_18;

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

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

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

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

/**
* @return known NetworkRuleAction values
*/
public static Collection<NetworkRuleAction> values() {
return values(NetworkRuleAction.class);
}
}
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.cognitiveservices.v2017_04_18;

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

/**
* Defines values for NetworkRuleBypassOptions.
*/
public final class NetworkRuleBypassOptions extends ExpandableStringEnum<NetworkRuleBypassOptions> {
/** Static value AzureServices for NetworkRuleBypassOptions. */
public static final NetworkRuleBypassOptions AZURE_SERVICES = fromString("AzureServices");

/** Static value None for NetworkRuleBypassOptions. */
public static final NetworkRuleBypassOptions NONE = fromString("None");

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

/**
* @return known NetworkRuleBypassOptions values
*/
public static Collection<NetworkRuleBypassOptions> values() {
return values(NetworkRuleBypassOptions.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/**
* 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.cognitiveservices.v2017_04_18;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* A set of rules governing the network accessibility.
*/
public class NetworkRuleSet {
/**
* Tells what traffic can bypass network rules. This can be 'AzureServices'
* or 'None'. If not specified the default is 'AzureServices'. Possible
* values include: 'AzureServices', 'None'.
*/
@JsonProperty(value = "bypass")
private NetworkRuleBypassOptions bypass;

/**
* The default action when no rule from ipRules and from
* virtualNetworkRules match. This is only used after the bypass property
* has been evaluated. Possible values include: 'Allow', 'Deny'.
*/
@JsonProperty(value = "defaultAction")
private NetworkRuleAction defaultAction;

/**
* The list of IP address rules.
*/
@JsonProperty(value = "ipRules")
private List<IpRule> ipRules;

/**
* The list of virtual network rules.
*/
@JsonProperty(value = "virtualNetworkRules")
private List<VirtualNetworkRule> virtualNetworkRules;

/**
* Get tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None'.
*
* @return the bypass value
*/
public NetworkRuleBypassOptions bypass() {
return this.bypass;
}

/**
* Set tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None'.
*
* @param bypass the bypass value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withBypass(NetworkRuleBypassOptions bypass) {
this.bypass = bypass;
return this;
}

/**
* Get the default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny'.
*
* @return the defaultAction value
*/
public NetworkRuleAction defaultAction() {
return this.defaultAction;
}

/**
* Set the default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny'.
*
* @param defaultAction the defaultAction value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withDefaultAction(NetworkRuleAction defaultAction) {
this.defaultAction = defaultAction;
return this;
}

/**
* Get the list of IP address rules.
*
* @return the ipRules value
*/
public List<IpRule> ipRules() {
return this.ipRules;
}

/**
* Set the list of IP address rules.
*
* @param ipRules the ipRules value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withIpRules(List<IpRule> ipRules) {
this.ipRules = ipRules;
return this;
}

/**
* Get the list of virtual network rules.
*
* @return the virtualNetworkRules value
*/
public List<VirtualNetworkRule> virtualNetworkRules() {
return this.virtualNetworkRules;
}

/**
* Set the list of virtual network rules.
*
* @param virtualNetworkRules the virtualNetworkRules value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withVirtualNetworkRules(List<VirtualNetworkRule> virtualNetworkRules) {
this.virtualNetworkRules = virtualNetworkRules;
return this;
}

}
Loading