Skip to content
Closed
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 @@ -49,6 +49,8 @@ public CognitiveServicesAccount()
/// <param name="internalId">The internal identifier.</param>
/// <param name="customSubDomainName">Optional subdomain name used for
/// token-based authentication.</param>
/// <param name="networkAcls">A collection of rules governing the
/// accessibility from specific network locations.</param>
/// <param name="sku">The SKU of Cognitive Services account.</param>
/// <param name="tags">Gets or sets a list of key value pairs that
/// describe the resource. These tags can be used in viewing and
Expand All @@ -57,7 +59,7 @@ public CognitiveServicesAccount()
/// greater than 128 characters and value no greater than 256
/// characters.</param>
/// <param name="type">Resource type</param>
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<string, string> tags = default(IDictionary<string, string>), 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<string, string> tags = default(IDictionary<string, string>), string type = default(string))
{
Etag = etag;
Id = id;
Expand All @@ -68,6 +70,7 @@ public CognitiveServicesAccount()
Endpoint = endpoint;
InternalId = internalId;
CustomSubDomainName = customSubDomainName;
NetworkAcls = networkAcls;
Sku = sku;
Tags = tags;
Type = type;
Expand Down Expand Up @@ -136,6 +139,13 @@ public CognitiveServicesAccount()
[JsonProperty(PropertyName = "properties.customSubDomainName")]
public string CustomSubDomainName { get; set; }

/// <summary>
/// Gets or sets a collection of rules governing the accessibility from
/// specific network locations.
/// </summary>
[JsonProperty(PropertyName = "properties.networkAcls")]
public NetworkRuleSet NetworkAcls { get; set; }

/// <summary>
/// Gets or sets the SKU of Cognitive Services account.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.CognitiveServices.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// A rule governing the accessibility from a specific ip address or ip
/// range.
/// </summary>
public partial class IPRule
{
/// <summary>
/// Initializes a new instance of the IPRule class.
/// </summary>
public IPRule()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the IPRule class.
/// </summary>
/// <param name="value">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>
public IPRule(string value)
{
Value = value;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// 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).
/// </summary>
[JsonProperty(PropertyName = "value")]
public string Value { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Value == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Value");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.CognitiveServices.Models
{

/// <summary>
/// Defines values for NetworkRuleAction.
/// </summary>
public static class NetworkRuleAction
{
public const string Allow = "Allow";
public const string Deny = "Deny";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.CognitiveServices.Models
{

/// <summary>
/// Defines values for NetworkRuleBypassOptions.
/// </summary>
public static class NetworkRuleBypassOptions
{
public const string AzureServices = "AzureServices";
public const string None = "None";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.CognitiveServices.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// A set of rules governing the network accessibility.
/// </summary>
public partial class NetworkRuleSet
{
/// <summary>
/// Initializes a new instance of the NetworkRuleSet class.
/// </summary>
public NetworkRuleSet()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the NetworkRuleSet class.
/// </summary>
/// <param name="bypass">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>
/// <param name="defaultAction">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>
/// <param name="ipRules">The list of IP address rules.</param>
/// <param name="virtualNetworkRules">The list of virtual network
/// rules.</param>
public NetworkRuleSet(string bypass = default(string), string defaultAction = default(string), IList<IPRule> ipRules = default(IList<IPRule>), IList<VirtualNetworkRule> virtualNetworkRules = default(IList<VirtualNetworkRule>))
{
Bypass = bypass;
DefaultAction = defaultAction;
IpRules = ipRules;
VirtualNetworkRules = virtualNetworkRules;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// 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'
/// </summary>
[JsonProperty(PropertyName = "bypass")]
public string Bypass { get; set; }

/// <summary>
/// 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'
/// </summary>
[JsonProperty(PropertyName = "defaultAction")]
public string DefaultAction { get; set; }

/// <summary>
/// Gets or sets the list of IP address rules.
/// </summary>
[JsonProperty(PropertyName = "ipRules")]
public IList<IPRule> IpRules { get; set; }

/// <summary>
/// Gets or sets the list of virtual network rules.
/// </summary>
[JsonProperty(PropertyName = "virtualNetworkRules")]
public IList<VirtualNetworkRule> VirtualNetworkRules { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.CognitiveServices.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// A rule governing the accessibility from a specific virtual network.
/// </summary>
public partial class VirtualNetworkRule
{
/// <summary>
/// Initializes a new instance of the VirtualNetworkRule class.
/// </summary>
public VirtualNetworkRule()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the VirtualNetworkRule class.
/// </summary>
/// <param name="id">Full resource id of a vnet subnet, such as
/// '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.</param>
/// <param name="state">Gets the state of virtual network rule.</param>
public VirtualNetworkRule(string id, string state = default(string))
{
Id = id;
State = state;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets full resource id of a vnet subnet, such as
/// '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
/// </summary>
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }

/// <summary>
/// Gets the state of virtual network rule.
/// </summary>
[JsonProperty(PropertyName = "state")]
public string State { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Id == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Id");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,5 @@ public static IEnumerable<Tuple<string, string, string>> 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
}
}