diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs index 2a060e0925bc..2780d0f16127 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/CognitiveServicesAccount.cs @@ -49,6 +49,8 @@ public CognitiveServicesAccount() /// The internal identifier. /// Optional subdomain name used for /// token-based authentication. + /// A collection of rules governing the + /// accessibility from specific network locations. /// The SKU of Cognitive Services account. /// Gets or sets a list of key value pairs that /// describe the resource. These tags can be used in viewing and @@ -57,7 +59,7 @@ public CognitiveServicesAccount() /// greater than 128 characters and value no greater than 256 /// characters. /// Resource type - public CognitiveServicesAccount(string etag = default(string), string id = default(string), string kind = default(string), string location = default(string), string name = default(string), string provisioningState = default(string), string endpoint = default(string), string internalId = default(string), string customSubDomainName = default(string), Sku sku = default(Sku), IDictionary tags = default(IDictionary), string type = default(string)) + public CognitiveServicesAccount(string etag = default(string), string id = default(string), string kind = default(string), string location = default(string), string name = default(string), string provisioningState = default(string), string endpoint = default(string), string internalId = default(string), string customSubDomainName = default(string), NetworkRuleSet networkAcls = default(NetworkRuleSet), Sku sku = default(Sku), IDictionary tags = default(IDictionary), string type = default(string)) { Etag = etag; Id = id; @@ -68,6 +70,7 @@ public CognitiveServicesAccount() Endpoint = endpoint; InternalId = internalId; CustomSubDomainName = customSubDomainName; + NetworkAcls = networkAcls; Sku = sku; Tags = tags; Type = type; @@ -136,6 +139,13 @@ public CognitiveServicesAccount() [JsonProperty(PropertyName = "properties.customSubDomainName")] public string CustomSubDomainName { get; set; } + /// + /// Gets or sets a collection of rules governing the accessibility from + /// specific network locations. + /// + [JsonProperty(PropertyName = "properties.networkAcls")] + public NetworkRuleSet NetworkAcls { get; set; } + /// /// Gets or sets the SKU of Cognitive Services account. /// diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/IPRule.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/IPRule.cs new file mode 100644 index 000000000000..e5150ad46748 --- /dev/null +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/IPRule.cs @@ -0,0 +1,70 @@ +// +// 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. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A rule governing the accessibility from a specific ip address or ip + /// range. + /// + public partial class IPRule + { + /// + /// Initializes a new instance of the IPRule class. + /// + public IPRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IPRule class. + /// + /// 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). + public IPRule(string value) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets 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(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleAction.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleAction.cs new file mode 100644 index 000000000000..fac179646c85 --- /dev/null +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleAction.cs @@ -0,0 +1,22 @@ +// +// 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. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices.Models +{ + + /// + /// Defines values for NetworkRuleAction. + /// + public static class NetworkRuleAction + { + public const string Allow = "Allow"; + public const string Deny = "Deny"; + } +} diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleBypassOptions.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleBypassOptions.cs new file mode 100644 index 000000000000..7fe11f223842 --- /dev/null +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleBypassOptions.cs @@ -0,0 +1,22 @@ +// +// 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. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices.Models +{ + + /// + /// Defines values for NetworkRuleBypassOptions. + /// + public static class NetworkRuleBypassOptions + { + public const string AzureServices = "AzureServices"; + public const string None = "None"; + } +} diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleSet.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleSet.cs new file mode 100644 index 000000000000..0180c4d2233c --- /dev/null +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/NetworkRuleSet.cs @@ -0,0 +1,89 @@ +// +// 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. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A set of rules governing the network accessibility. + /// + public partial class NetworkRuleSet + { + /// + /// Initializes a new instance of the NetworkRuleSet class. + /// + public NetworkRuleSet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetworkRuleSet class. + /// + /// 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' + /// 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' + /// The list of IP address rules. + /// The list of virtual network + /// rules. + public NetworkRuleSet(string bypass = default(string), string defaultAction = default(string), IList ipRules = default(IList), IList virtualNetworkRules = default(IList)) + { + Bypass = bypass; + DefaultAction = defaultAction; + IpRules = ipRules; + VirtualNetworkRules = virtualNetworkRules; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets 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(PropertyName = "bypass")] + public string Bypass { get; set; } + + /// + /// Gets or sets 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(PropertyName = "defaultAction")] + public string DefaultAction { get; set; } + + /// + /// Gets or sets the list of IP address rules. + /// + [JsonProperty(PropertyName = "ipRules")] + public IList IpRules { get; set; } + + /// + /// Gets or sets the list of virtual network rules. + /// + [JsonProperty(PropertyName = "virtualNetworkRules")] + public IList VirtualNetworkRules { get; set; } + + } +} diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/VirtualNetworkRule.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/VirtualNetworkRule.cs new file mode 100644 index 000000000000..f3325f37faa7 --- /dev/null +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/Models/VirtualNetworkRule.cs @@ -0,0 +1,75 @@ +// +// 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. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.CognitiveServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A rule governing the accessibility from a specific virtual network. + /// + public partial class VirtualNetworkRule + { + /// + /// Initializes a new instance of the VirtualNetworkRule class. + /// + public VirtualNetworkRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualNetworkRule class. + /// + /// Full resource id of a vnet subnet, such as + /// '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + /// Gets the state of virtual network rule. + public VirtualNetworkRule(string id, string state = default(string)) + { + Id = id; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets full resource id of a vnet subnet, such as + /// '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets the state of virtual network rule. + /// + [JsonProperty(PropertyName = "state")] + public string State { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Id == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Id"); + } + } + } +} diff --git a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs index 34f1ec8db904..14cb92cbea3b 100644 --- a/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs +++ b/src/SDKs/CognitiveServices/management/Management.CognitiveServices/Generated/SdkInfo_CognitiveServicesManagementClient.cs @@ -26,16 +26,5 @@ public static IEnumerable> ApiInfo_CognitiveServic }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\Github\\azure-sdk-for-net\\src\\SDKs"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "04f162b085db0ce088c8e60a8539db1fafb46c7b"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -