diff --git a/src/SDKs/Cdn/AzSdk.RP.props b/src/SDKs/Cdn/AzSdk.RP.props index 10ffcf5a2267..6f8a6f84f146 100644 --- a/src/SDKs/Cdn/AzSdk.RP.props +++ b/src/SDKs/Cdn/AzSdk.RP.props @@ -1,7 +1,7 @@ - Cdn_2017-10-12; + Cdn_2019-04-15; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/CdnManagementClient.cs b/src/SDKs/Cdn/Management.Cdn/Generated/CdnManagementClient.cs index 6346d5cb132f..2edc49a15405 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/CdnManagementClient.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/CdnManagementClient.cs @@ -363,7 +363,7 @@ private void Initialize() Operations = new Operations(this); EdgeNodes = new EdgeNodesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2017-10-12"; + ApiVersion = "2019-04-15"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -393,10 +393,10 @@ private void Initialize() new Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("name")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("name")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("name")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("name")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("name")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("name")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("certificateSource")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("certificateSource")); CustomInitialize(); diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/CustomDomainsOperations.cs b/src/SDKs/Cdn/Management.Cdn/Generated/CustomDomainsOperations.cs index 63eb7b9ca484..3a85e85f60d2 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/CustomDomainsOperations.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/CustomDomainsOperations.cs @@ -772,28 +772,6 @@ internal CustomDomainsOperations(CdnManagementClient client) return _result; } - public async Task> EnableCustomHttpsWithHttpMessagesAsync( - string resourceGroupName, - string profileName, - string endpointName, - string customDomainName, - CustomDomainHttpsParameters customDomainHttpsParameters = default(CustomDomainHttpsParameters), - Dictionary> customHeaders = null, - CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginEnableCustomHttpsWithHttpMessagesAsync( - resourceGroupName, - profileName, - endpointName, - customDomainName, - customDomainHttpsParameters, - customHeaders, - cancellationToken) - .ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - /// /// Enable https delivery of the custom domain. /// @@ -835,14 +813,7 @@ public async Task> EnableCustomHttpsWithHtt /// /// A response object containing the response body and response headers. /// - public async Task> BeginEnableCustomHttpsWithHttpMessagesAsync( - string resourceGroupName, - string profileName, - string endpointName, - string customDomainName, - CustomDomainHttpsParameters customDomainHttpsParameters = default(CustomDomainHttpsParameters), - Dictionary> customHeaders = null, - CancellationToken cancellationToken = default(CancellationToken)) + public async Task> EnableCustomHttpsWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointName, string customDomainName, CustomDomainHttpsParameters customDomainHttpsParameters = default(CustomDomainHttpsParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/CacheBehavior.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/CacheBehavior.cs new file mode 100644 index 000000000000..03ad25b2e082 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/CacheBehavior.cs @@ -0,0 +1,23 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for CacheBehavior. + /// + public static class CacheBehavior + { + public const string BypassCache = "BypassCache"; + public const string Override = "Override"; + public const string SetIfMissing = "SetIfMissing"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/CacheExpirationActionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/CacheExpirationActionParameters.cs index 8a03e5f352a0..b26b723aec36 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/Models/CacheExpirationActionParameters.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/CacheExpirationActionParameters.cs @@ -32,9 +32,9 @@ public CacheExpirationActionParameters() /// Initializes a new instance of the CacheExpirationActionParameters /// class. /// - /// Caching behavior for the requests that - /// include query strings. Possible values include: 'BypassCache', - /// 'Override', 'SetIfMissing' + /// Caching behavior for the requests. + /// Possible values include: 'BypassCache', 'Override', + /// 'SetIfMissing' /// The duration for which the content /// needs to be cached. Allowed format is [d.]hh:mm:ss public CacheExpirationActionParameters(string cacheBehavior, string cacheDuration = default(string)) @@ -48,7 +48,7 @@ public CacheExpirationActionParameters() /// static CacheExpirationActionParameters() { - Odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters"; + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters"; CacheType = "All"; } @@ -58,9 +58,8 @@ static CacheExpirationActionParameters() partial void CustomInit(); /// - /// Gets or sets caching behavior for the requests that include query - /// strings. Possible values include: 'BypassCache', 'Override', - /// 'SetIfMissing' + /// Gets or sets caching behavior for the requests. Possible values + /// include: 'BypassCache', 'Override', 'SetIfMissing' /// [JsonProperty(PropertyName = "cacheBehavior")] public string CacheBehavior { get; set; } diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRule.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRule.cs index 45b73e1131c6..2df42b1fa586 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRule.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRule.cs @@ -32,6 +32,7 @@ public DeliveryRule() /// /// Initializes a new instance of the DeliveryRule class. /// + /// Name of the rule /// The order in which the rules are applied for /// the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser /// order will be applied before a rule with a greater order. Rule with @@ -41,11 +42,12 @@ public DeliveryRule() /// the conditions of a rule are satisfied. /// A list of conditions that must be matched /// for the actions to be executed - public DeliveryRule(int order, IList actions, IList conditions = default(IList)) + public DeliveryRule(string name, int order, IList actions, IList conditions = default(IList)) { + Name = name; Order = order; - Actions = actions; Conditions = conditions; + Actions = actions; CustomInit(); } @@ -54,6 +56,12 @@ public DeliveryRule() /// partial void CustomInit(); + /// + /// Gets or sets name of the rule + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + /// /// Gets or sets the order in which the rules are applied for the /// endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order @@ -64,13 +72,6 @@ public DeliveryRule() [JsonProperty(PropertyName = "order")] public int Order { get; set; } - /// - /// Gets or sets a list of actions that are executed when all the - /// conditions of a rule are satisfied. - /// - [JsonProperty(PropertyName = "actions")] - public IList Actions { get; set; } - /// /// Gets or sets a list of conditions that must be matched for the /// actions to be executed @@ -78,6 +79,13 @@ public DeliveryRule() [JsonProperty(PropertyName = "conditions")] public IList Conditions { get; set; } + /// + /// Gets or sets a list of actions that are executed when all the + /// conditions of a rule are satisfied. + /// + [JsonProperty(PropertyName = "actions")] + public IList Actions { get; set; } + /// /// Validate the object. /// @@ -86,6 +94,10 @@ public DeliveryRule() /// public virtual void Validate() { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } if (Actions == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Actions"); diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleIsDeviceCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleIsDeviceCondition.cs new file mode 100644 index 000000000000..e59e61d7049a --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleIsDeviceCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the IsDevice condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("IsDevice")] + public partial class DeliveryRuleIsDeviceCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the DeliveryRuleIsDeviceCondition + /// class. + /// + public DeliveryRuleIsDeviceCondition() + { + Parameters = new IsDeviceMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRuleIsDeviceCondition + /// class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleIsDeviceCondition(IsDeviceMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public IsDeviceMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRulePostArgsCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRulePostArgsCondition.cs new file mode 100644 index 000000000000..94d716f0afe4 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRulePostArgsCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the PostArgs condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("PostArgs")] + public partial class DeliveryRulePostArgsCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the DeliveryRulePostArgsCondition + /// class. + /// + public DeliveryRulePostArgsCondition() + { + Parameters = new PostArgsMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRulePostArgsCondition + /// class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRulePostArgsCondition(PostArgsMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public PostArgsMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleQueryStringCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleQueryStringCondition.cs new file mode 100644 index 000000000000..431c9dc03707 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleQueryStringCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the QueryString condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("QueryString")] + public partial class DeliveryRuleQueryStringCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the DeliveryRuleQueryStringCondition + /// class. + /// + public DeliveryRuleQueryStringCondition() + { + Parameters = new QueryStringMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRuleQueryStringCondition + /// class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleQueryStringCondition(QueryStringMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public QueryStringMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRemoteAddressCondition.cs similarity index 50% rename from src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionConditionParameters.cs rename to src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRemoteAddressCondition.cs index 9cedd6034c4d..164fc12d47cc 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionConditionParameters.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRemoteAddressCondition.cs @@ -12,42 +12,35 @@ namespace Microsoft.Azure.Management.Cdn.Models { using Microsoft.Rest; using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Defines the parameters for the URL file extension condition. + /// Defines the RemoteAddress condition for the delivery rule. /// - public partial class UrlFileExtensionConditionParameters + [Newtonsoft.Json.JsonObject("RemoteAddress")] + public partial class DeliveryRuleRemoteAddressCondition : DeliveryRuleCondition { /// /// Initializes a new instance of the - /// UrlFileExtensionConditionParameters class. + /// DeliveryRuleRemoteAddressCondition class. /// - public UrlFileExtensionConditionParameters() + public DeliveryRuleRemoteAddressCondition() { + Parameters = new RemoteAddressMatchConditionParameters(); CustomInit(); } /// /// Initializes a new instance of the - /// UrlFileExtensionConditionParameters class. + /// DeliveryRuleRemoteAddressCondition class. /// - /// A list of extensions for the condition of - /// the delivery rule. - public UrlFileExtensionConditionParameters(IList extensions) + /// Defines the parameters for the + /// condition. + public DeliveryRuleRemoteAddressCondition(RemoteAddressMatchConditionParameters parameters) { - Extensions = extensions; + Parameters = parameters; CustomInit(); } - /// - /// Static constructor for UrlFileExtensionConditionParameters class. - /// - static UrlFileExtensionConditionParameters() - { - Odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters"; - } /// /// An initialization method that performs custom operations like setting defaults @@ -55,16 +48,10 @@ static UrlFileExtensionConditionParameters() partial void CustomInit(); /// - /// Gets or sets a list of extensions for the condition of the delivery - /// rule. + /// Gets or sets defines the parameters for the condition. /// - [JsonProperty(PropertyName = "extensions")] - public IList Extensions { get; set; } - - /// - /// - [JsonProperty(PropertyName = "@odata.type")] - public static string Odatatype { get; private set; } + [JsonProperty(PropertyName = "parameters")] + public RemoteAddressMatchConditionParameters Parameters { get; set; } /// /// Validate the object. @@ -74,9 +61,13 @@ static UrlFileExtensionConditionParameters() /// public virtual void Validate() { - if (Extensions == null) + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Extensions"); + Parameters.Validate(); } } } diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestBodyCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestBodyCondition.cs new file mode 100644 index 000000000000..7c242c7a1a66 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestBodyCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the RequestBody condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("RequestBody")] + public partial class DeliveryRuleRequestBodyCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the DeliveryRuleRequestBodyCondition + /// class. + /// + public DeliveryRuleRequestBodyCondition() + { + Parameters = new RequestBodyMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRuleRequestBodyCondition + /// class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleRequestBodyCondition(RequestBodyMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public RequestBodyMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestHeaderAction.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestHeaderAction.cs new file mode 100644 index 000000000000..9da9ebe7a8c0 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestHeaderAction.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the request header action for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("ModifyRequestHeader")] + public partial class DeliveryRuleRequestHeaderAction : DeliveryRuleAction + { + /// + /// Initializes a new instance of the DeliveryRuleRequestHeaderAction + /// class. + /// + public DeliveryRuleRequestHeaderAction() + { + Parameters = new HeaderActionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRuleRequestHeaderAction + /// class. + /// + /// Defines the parameters for the + /// action. + public DeliveryRuleRequestHeaderAction(HeaderActionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the action. + /// + [JsonProperty(PropertyName = "parameters")] + public HeaderActionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestHeaderCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestHeaderCondition.cs new file mode 100644 index 000000000000..9c94a397d87e --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestHeaderCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the RequestHeader condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("RequestHeader")] + public partial class DeliveryRuleRequestHeaderCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the + /// DeliveryRuleRequestHeaderCondition class. + /// + public DeliveryRuleRequestHeaderCondition() + { + Parameters = new RequestHeaderMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DeliveryRuleRequestHeaderCondition class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleRequestHeaderCondition(RequestHeaderMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public RequestHeaderMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestMethodCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestMethodCondition.cs new file mode 100644 index 000000000000..edc90e365c37 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestMethodCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the RequestMethod condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("RequestMethod")] + public partial class DeliveryRuleRequestMethodCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the + /// DeliveryRuleRequestMethodCondition class. + /// + public DeliveryRuleRequestMethodCondition() + { + Parameters = new RequestMethodMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DeliveryRuleRequestMethodCondition class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleRequestMethodCondition(RequestMethodMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public RequestMethodMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestSchemeCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestSchemeCondition.cs new file mode 100644 index 000000000000..7d17f8742c24 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestSchemeCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the RequestScheme condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("RequestScheme")] + public partial class DeliveryRuleRequestSchemeCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the + /// DeliveryRuleRequestSchemeCondition class. + /// + public DeliveryRuleRequestSchemeCondition() + { + Parameters = new RequestSchemeMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DeliveryRuleRequestSchemeCondition class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleRequestSchemeCondition(RequestSchemeMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public RequestSchemeMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestUriCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestUriCondition.cs new file mode 100644 index 000000000000..f6aae9b749ac --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleRequestUriCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the RequestUri condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("RequestUri")] + public partial class DeliveryRuleRequestUriCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the DeliveryRuleRequestUriCondition + /// class. + /// + public DeliveryRuleRequestUriCondition() + { + Parameters = new RequestUriMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRuleRequestUriCondition + /// class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleRequestUriCondition(RequestUriMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public RequestUriMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleResponseHeaderAction.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleResponseHeaderAction.cs new file mode 100644 index 000000000000..c79f45b9ec6f --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleResponseHeaderAction.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the response header action for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("ModifyResponseHeader")] + public partial class DeliveryRuleResponseHeaderAction : DeliveryRuleAction + { + /// + /// Initializes a new instance of the DeliveryRuleResponseHeaderAction + /// class. + /// + public DeliveryRuleResponseHeaderAction() + { + Parameters = new HeaderActionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRuleResponseHeaderAction + /// class. + /// + /// Defines the parameters for the + /// action. + public DeliveryRuleResponseHeaderAction(HeaderActionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the action. + /// + [JsonProperty(PropertyName = "parameters")] + public HeaderActionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlFileExtensionCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlFileExtensionCondition.cs index f58354c79052..410898d5c7b9 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlFileExtensionCondition.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlFileExtensionCondition.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.Cdn.Models using System.Linq; /// - /// Defines the URL file extension condition for the delivery rule. + /// Defines the UrlFileExtension condition for the delivery rule. /// [Newtonsoft.Json.JsonObject("UrlFileExtension")] public partial class DeliveryRuleUrlFileExtensionCondition : DeliveryRuleCondition @@ -26,7 +26,7 @@ public partial class DeliveryRuleUrlFileExtensionCondition : DeliveryRuleConditi /// public DeliveryRuleUrlFileExtensionCondition() { - Parameters = new UrlFileExtensionConditionParameters(); + Parameters = new UrlFileExtensionMatchConditionParameters(); CustomInit(); } @@ -36,7 +36,7 @@ public DeliveryRuleUrlFileExtensionCondition() /// /// Defines the parameters for the /// condition. - public DeliveryRuleUrlFileExtensionCondition(UrlFileExtensionConditionParameters parameters) + public DeliveryRuleUrlFileExtensionCondition(UrlFileExtensionMatchConditionParameters parameters) { Parameters = parameters; CustomInit(); @@ -51,7 +51,7 @@ public DeliveryRuleUrlFileExtensionCondition(UrlFileExtensionConditionParameters /// Gets or sets defines the parameters for the condition. /// [JsonProperty(PropertyName = "parameters")] - public UrlFileExtensionConditionParameters Parameters { get; set; } + public UrlFileExtensionMatchConditionParameters Parameters { get; set; } /// /// Validate the object. diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlFileNameCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlFileNameCondition.cs new file mode 100644 index 000000000000..eb8d09e2082e --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlFileNameCondition.cs @@ -0,0 +1,74 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the UrlFileName condition for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("UrlFileName")] + public partial class DeliveryRuleUrlFileNameCondition : DeliveryRuleCondition + { + /// + /// Initializes a new instance of the DeliveryRuleUrlFileNameCondition + /// class. + /// + public DeliveryRuleUrlFileNameCondition() + { + Parameters = new UrlFileNameMatchConditionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeliveryRuleUrlFileNameCondition + /// class. + /// + /// Defines the parameters for the + /// condition. + public DeliveryRuleUrlFileNameCondition(UrlFileNameMatchConditionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the condition. + /// + [JsonProperty(PropertyName = "parameters")] + public UrlFileNameMatchConditionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlPathCondition.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlPathCondition.cs index 4b037f83d773..b8774822945c 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlPathCondition.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DeliveryRuleUrlPathCondition.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.Cdn.Models using System.Linq; /// - /// Defines the URL path condition for the delivery rule. + /// Defines the UrlPath condition for the delivery rule. /// [Newtonsoft.Json.JsonObject("UrlPath")] public partial class DeliveryRuleUrlPathCondition : DeliveryRuleCondition @@ -26,7 +26,7 @@ public partial class DeliveryRuleUrlPathCondition : DeliveryRuleCondition /// public DeliveryRuleUrlPathCondition() { - Parameters = new UrlPathConditionParameters(); + Parameters = new UrlPathMatchConditionParameters(); CustomInit(); } @@ -36,7 +36,7 @@ public DeliveryRuleUrlPathCondition() /// /// Defines the parameters for the /// condition. - public DeliveryRuleUrlPathCondition(UrlPathConditionParameters parameters) + public DeliveryRuleUrlPathCondition(UrlPathMatchConditionParameters parameters) { Parameters = parameters; CustomInit(); @@ -51,7 +51,7 @@ public DeliveryRuleUrlPathCondition(UrlPathConditionParameters parameters) /// Gets or sets defines the parameters for the condition. /// [JsonProperty(PropertyName = "parameters")] - public UrlPathConditionParameters Parameters { get; set; } + public UrlPathMatchConditionParameters Parameters { get; set; } /// /// Validate the object. diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/DestinationProtocol.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DestinationProtocol.cs new file mode 100644 index 000000000000..445c3b9a90e5 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/DestinationProtocol.cs @@ -0,0 +1,23 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for DestinationProtocol. + /// + public static class DestinationProtocol + { + public const string MatchRequest = "MatchRequest"; + public const string Http = "Http"; + public const string Https = "Https"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/HeaderAction.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/HeaderAction.cs new file mode 100644 index 000000000000..046a0712c4ef --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/HeaderAction.cs @@ -0,0 +1,23 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for HeaderAction. + /// + public static class HeaderAction + { + public const string Append = "Append"; + public const string Overwrite = "Overwrite"; + public const string Delete = "Delete"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/HeaderActionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/HeaderActionParameters.cs new file mode 100644 index 000000000000..c65b9259b139 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/HeaderActionParameters.cs @@ -0,0 +1,99 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the parameters for the request header action. + /// + public partial class HeaderActionParameters + { + /// + /// Initializes a new instance of the HeaderActionParameters class. + /// + public HeaderActionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HeaderActionParameters class. + /// + /// Action to perform. Possible values + /// include: 'Append', 'Overwrite', 'Delete' + /// Name of the header to modify + /// Value for the specified action + public HeaderActionParameters(string headerAction, string headerName, string value = default(string)) + { + HeaderAction = headerAction; + HeaderName = headerName; + Value = value; + CustomInit(); + } + /// + /// Static constructor for HeaderActionParameters class. + /// + static HeaderActionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets action to perform. Possible values include: 'Append', + /// 'Overwrite', 'Delete' + /// + [JsonProperty(PropertyName = "headerAction")] + public string HeaderAction { get; set; } + + /// + /// Gets or sets name of the header to modify + /// + [JsonProperty(PropertyName = "headerName")] + public string HeaderName { get; set; } + + /// + /// Gets or sets value for the specified action + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (HeaderAction == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "HeaderAction"); + } + if (HeaderName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "HeaderName"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/IsDeviceMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/IsDeviceMatchConditionParameters.cs new file mode 100644 index 000000000000..92309e54ae4b --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/IsDeviceMatchConditionParameters.cs @@ -0,0 +1,106 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for IsDevice match conditions + /// + public partial class IsDeviceMatchConditionParameters + { + /// + /// Initializes a new instance of the IsDeviceMatchConditionParameters + /// class. + /// + public IsDeviceMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IsDeviceMatchConditionParameters + /// class. + /// + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public IsDeviceMatchConditionParameters(IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for IsDeviceMatchConditionParameters class. + /// + static IsDeviceMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters"; + OperatorProperty = "Equal"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Describes operator to be matched + /// + [JsonProperty(PropertyName = "operator")] + public static string OperatorProperty { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/PostArgsMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/PostArgsMatchConditionParameters.cs new file mode 100644 index 000000000000..46d513316942 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/PostArgsMatchConditionParameters.cs @@ -0,0 +1,128 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for PostArgs match conditions + /// + public partial class PostArgsMatchConditionParameters + { + /// + /// Initializes a new instance of the PostArgsMatchConditionParameters + /// class. + /// + public PostArgsMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PostArgsMatchConditionParameters + /// class. + /// + /// Name of PostArg to be matched + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public PostArgsMatchConditionParameters(string selector, string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + Selector = selector; + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for PostArgsMatchConditionParameters class. + /// + static PostArgsMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of PostArg to be matched + /// + [JsonProperty(PropertyName = "selector")] + public string Selector { get; set; } + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Selector == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Selector"); + } + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/PostArgsOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/PostArgsOperator.cs new file mode 100644 index 000000000000..bad9f5834e92 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/PostArgsOperator.cs @@ -0,0 +1,29 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for PostArgsOperator. + /// + public static class PostArgsOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/QueryStringMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/QueryStringMatchConditionParameters.cs new file mode 100644 index 000000000000..60650c87f3bb --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/QueryStringMatchConditionParameters.cs @@ -0,0 +1,116 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for QueryString match conditions + /// + public partial class QueryStringMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// QueryStringMatchConditionParameters class. + /// + public QueryStringMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// QueryStringMatchConditionParameters class. + /// + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public QueryStringMatchConditionParameters(string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for QueryStringMatchConditionParameters class. + /// + static QueryStringMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/QueryStringOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/QueryStringOperator.cs new file mode 100644 index 000000000000..ab86bf692e4e --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/QueryStringOperator.cs @@ -0,0 +1,29 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for QueryStringOperator. + /// + public static class QueryStringOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RedirectType.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RedirectType.cs new file mode 100644 index 000000000000..662098a86ee2 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RedirectType.cs @@ -0,0 +1,24 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for RedirectType. + /// + public static class RedirectType + { + public const string Moved = "Moved"; + public const string Found = "Found"; + public const string TemporaryRedirect = "TemporaryRedirect"; + public const string PermanentRedirect = "PermanentRedirect"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RemoteAddressMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RemoteAddressMatchConditionParameters.cs new file mode 100644 index 000000000000..53be556825a9 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RemoteAddressMatchConditionParameters.cs @@ -0,0 +1,118 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for RemoteAddress match conditions + /// + public partial class RemoteAddressMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// RemoteAddressMatchConditionParameters class. + /// + public RemoteAddressMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RemoteAddressMatchConditionParameters class. + /// + /// Describes operator to be matched. + /// Possible values include: 'Any', 'IPMatch', 'GeoMatch' + /// Match values to match against. The + /// operator will apply to each value in here with OR semantics. If any + /// of them match the variable with the given operator this match + /// condition is considered a match. + /// Describes if this is negate condition + /// or not + /// List of transforms + public RemoteAddressMatchConditionParameters(string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for RemoteAddressMatchConditionParameters class. + /// + static RemoteAddressMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'IPMatch', 'GeoMatch' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets match values to match against. The operator will apply + /// to each value in here with OR semantics. If any of them match the + /// variable with the given operator this match condition is considered + /// a match. + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RemoteAddressOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RemoteAddressOperator.cs new file mode 100644 index 000000000000..4c4481652b88 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RemoteAddressOperator.cs @@ -0,0 +1,23 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for RemoteAddressOperator. + /// + public static class RemoteAddressOperator + { + public const string Any = "Any"; + public const string IPMatch = "IPMatch"; + public const string GeoMatch = "GeoMatch"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestBodyMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestBodyMatchConditionParameters.cs new file mode 100644 index 000000000000..aaf5eaa0b373 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestBodyMatchConditionParameters.cs @@ -0,0 +1,116 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for RequestBody match conditions + /// + public partial class RequestBodyMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// RequestBodyMatchConditionParameters class. + /// + public RequestBodyMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RequestBodyMatchConditionParameters class. + /// + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public RequestBodyMatchConditionParameters(string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for RequestBodyMatchConditionParameters class. + /// + static RequestBodyMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestBodyOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestBodyOperator.cs new file mode 100644 index 000000000000..767b73f8d012 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestBodyOperator.cs @@ -0,0 +1,29 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for RequestBodyOperator. + /// + public static class RequestBodyOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestHeaderMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestHeaderMatchConditionParameters.cs new file mode 100644 index 000000000000..ce07cbc18f6f --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestHeaderMatchConditionParameters.cs @@ -0,0 +1,128 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for RequestHeader match conditions + /// + public partial class RequestHeaderMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// RequestHeaderMatchConditionParameters class. + /// + public RequestHeaderMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RequestHeaderMatchConditionParameters class. + /// + /// Name of Header to be matched + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public RequestHeaderMatchConditionParameters(string selector, string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + Selector = selector; + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for RequestHeaderMatchConditionParameters class. + /// + static RequestHeaderMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of Header to be matched + /// + [JsonProperty(PropertyName = "selector")] + public string Selector { get; set; } + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Selector == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Selector"); + } + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestHeaderOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestHeaderOperator.cs new file mode 100644 index 000000000000..08b6631dd8e8 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestHeaderOperator.cs @@ -0,0 +1,29 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for RequestHeaderOperator. + /// + public static class RequestHeaderOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestMethodMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestMethodMatchConditionParameters.cs new file mode 100644 index 000000000000..16e60f7e2d57 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestMethodMatchConditionParameters.cs @@ -0,0 +1,98 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for RequestMethod match conditions + /// + public partial class RequestMethodMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// RequestMethodMatchConditionParameters class. + /// + public RequestMethodMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RequestMethodMatchConditionParameters class. + /// + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + public RequestMethodMatchConditionParameters(IList matchValues, bool? negateCondition = default(bool?)) + { + NegateCondition = negateCondition; + MatchValues = matchValues; + CustomInit(); + } + /// + /// Static constructor for RequestMethodMatchConditionParameters class. + /// + static RequestMethodMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters"; + OperatorProperty = "Equal"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Describes operator to be matched + /// + [JsonProperty(PropertyName = "operator")] + public static string OperatorProperty { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestSchemeMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestSchemeMatchConditionParameters.cs new file mode 100644 index 000000000000..be8d92fb7160 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestSchemeMatchConditionParameters.cs @@ -0,0 +1,98 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for RequestScheme match conditions + /// + public partial class RequestSchemeMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// RequestSchemeMatchConditionParameters class. + /// + public RequestSchemeMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RequestSchemeMatchConditionParameters class. + /// + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + public RequestSchemeMatchConditionParameters(IList matchValues, bool? negateCondition = default(bool?)) + { + NegateCondition = negateCondition; + MatchValues = matchValues; + CustomInit(); + } + /// + /// Static constructor for RequestSchemeMatchConditionParameters class. + /// + static RequestSchemeMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters"; + OperatorProperty = "Equal"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Describes operator to be matched + /// + [JsonProperty(PropertyName = "operator")] + public static string OperatorProperty { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestUriMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestUriMatchConditionParameters.cs new file mode 100644 index 000000000000..d23be012b114 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestUriMatchConditionParameters.cs @@ -0,0 +1,116 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for RequestUri match conditions + /// + public partial class RequestUriMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// RequestUriMatchConditionParameters class. + /// + public RequestUriMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RequestUriMatchConditionParameters class. + /// + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public RequestUriMatchConditionParameters(string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for RequestUriMatchConditionParameters class. + /// + static RequestUriMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestUriOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestUriOperator.cs new file mode 100644 index 000000000000..6d782050565f --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/RequestUriOperator.cs @@ -0,0 +1,29 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for RequestUriOperator. + /// + public static class RequestUriOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/Transform.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/Transform.cs new file mode 100644 index 000000000000..5fdf9e212ff1 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/Transform.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.Cdn.Models +{ + + /// + /// Defines values for Transform. + /// + public static class Transform + { + public const string Lowercase = "Lowercase"; + public const string Uppercase = "Uppercase"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionMatchConditionParameters.cs new file mode 100644 index 000000000000..cce16a9dc84c --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionMatchConditionParameters.cs @@ -0,0 +1,117 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for UrlFileExtension match conditions + /// + public partial class UrlFileExtensionMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// UrlFileExtensionMatchConditionParameters class. + /// + public UrlFileExtensionMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UrlFileExtensionMatchConditionParameters class. + /// + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public UrlFileExtensionMatchConditionParameters(string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for UrlFileExtensionMatchConditionParameters + /// class. + /// + static UrlFileExtensionMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionOperator.cs new file mode 100644 index 000000000000..8e8350161370 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileExtensionOperator.cs @@ -0,0 +1,29 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for UrlFileExtensionOperator. + /// + public static class UrlFileExtensionOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileNameMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileNameMatchConditionParameters.cs new file mode 100644 index 000000000000..c6479fb380bf --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileNameMatchConditionParameters.cs @@ -0,0 +1,116 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for UrlFilename match conditions + /// + public partial class UrlFileNameMatchConditionParameters + { + /// + /// Initializes a new instance of the + /// UrlFileNameMatchConditionParameters class. + /// + public UrlFileNameMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UrlFileNameMatchConditionParameters class. + /// + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public UrlFileNameMatchConditionParameters(string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for UrlFileNameMatchConditionParameters class. + /// + static UrlFileNameMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileNameOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileNameOperator.cs new file mode 100644 index 000000000000..a72a96306f94 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlFileNameOperator.cs @@ -0,0 +1,29 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for UrlFileNameOperator. + /// + public static class UrlFileNameOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathConditionParameters.cs deleted file mode 100644 index b00273c4d20c..000000000000 --- a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathConditionParameters.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// 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.Cdn.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines the parameters for the URL path condition. - /// - public partial class UrlPathConditionParameters - { - /// - /// Initializes a new instance of the UrlPathConditionParameters class. - /// - public UrlPathConditionParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the UrlPathConditionParameters class. - /// - /// A URL path for the condition of the delivery - /// rule - /// The match type for the condition of the - /// delivery rule. Possible values include: 'Literal', - /// 'Wildcard' - public UrlPathConditionParameters(string path, string matchType) - { - Path = path; - MatchType = matchType; - CustomInit(); - } - /// - /// Static constructor for UrlPathConditionParameters class. - /// - static UrlPathConditionParameters() - { - Odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters"; - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a URL path for the condition of the delivery rule - /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } - - /// - /// Gets or sets the match type for the condition of the delivery rule. - /// Possible values include: 'Literal', 'Wildcard' - /// - [JsonProperty(PropertyName = "matchType")] - public string MatchType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "@odata.type")] - public static string Odatatype { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Path == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Path"); - } - if (MatchType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "MatchType"); - } - } - } -} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathMatchConditionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathMatchConditionParameters.cs new file mode 100644 index 000000000000..c351e23920a9 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathMatchConditionParameters.cs @@ -0,0 +1,117 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines the parameters for UrlPath match conditions + /// + public partial class UrlPathMatchConditionParameters + { + /// + /// Initializes a new instance of the UrlPathMatchConditionParameters + /// class. + /// + public UrlPathMatchConditionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UrlPathMatchConditionParameters + /// class. + /// + /// Describes operator to be matched. + /// Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', + /// 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', + /// 'GreaterThanOrEqual', 'Wildcard' + /// The match value for the condition of the + /// delivery rule + /// Describes if this is negate condition + /// or not + /// List of transforms + public UrlPathMatchConditionParameters(string operatorProperty, IList matchValues, bool? negateCondition = default(bool?), IList transforms = default(IList)) + { + OperatorProperty = operatorProperty; + NegateCondition = negateCondition; + MatchValues = matchValues; + Transforms = transforms; + CustomInit(); + } + /// + /// Static constructor for UrlPathMatchConditionParameters class. + /// + static UrlPathMatchConditionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes operator to be matched. Possible values + /// include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + /// 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + /// 'Wildcard' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets describes if this is negate condition or not + /// + [JsonProperty(PropertyName = "negateCondition")] + public bool? NegateCondition { get; set; } + + /// + /// Gets or sets the match value for the condition of the delivery rule + /// + [JsonProperty(PropertyName = "matchValues")] + public IList MatchValues { get; set; } + + /// + /// Gets or sets list of transforms + /// + [JsonProperty(PropertyName = "transforms")] + public IList Transforms { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (MatchValues == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchValues"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathOperator.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathOperator.cs new file mode 100644 index 000000000000..f72935feff35 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlPathOperator.cs @@ -0,0 +1,30 @@ +// +// 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.Cdn.Models +{ + + /// + /// Defines values for UrlPathOperator. + /// + public static class UrlPathOperator + { + public const string Any = "Any"; + public const string Equal = "Equal"; + public const string Contains = "Contains"; + public const string BeginsWith = "BeginsWith"; + public const string EndsWith = "EndsWith"; + public const string LessThan = "LessThan"; + public const string LessThanOrEqual = "LessThanOrEqual"; + public const string GreaterThan = "GreaterThan"; + public const string GreaterThanOrEqual = "GreaterThanOrEqual"; + public const string Wildcard = "Wildcard"; + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlRedirectAction.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlRedirectAction.cs new file mode 100644 index 000000000000..98b01cefb735 --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlRedirectAction.cs @@ -0,0 +1,72 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the url redirect action for the delivery rule. + /// + [Newtonsoft.Json.JsonObject("UrlRedirect")] + public partial class UrlRedirectAction : DeliveryRuleAction + { + /// + /// Initializes a new instance of the UrlRedirectAction class. + /// + public UrlRedirectAction() + { + Parameters = new UrlRedirectActionParameters(); + CustomInit(); + } + + /// + /// Initializes a new instance of the UrlRedirectAction class. + /// + /// Defines the parameters for the + /// action. + public UrlRedirectAction(UrlRedirectActionParameters parameters) + { + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines the parameters for the action. + /// + [JsonProperty(PropertyName = "parameters")] + public UrlRedirectActionParameters Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Parameters"); + } + if (Parameters != null) + { + Parameters.Validate(); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlRedirectActionParameters.cs b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlRedirectActionParameters.cs new file mode 100644 index 000000000000..ffd2e579e00e --- /dev/null +++ b/src/SDKs/Cdn/Management.Cdn/Generated/Models/UrlRedirectActionParameters.cs @@ -0,0 +1,145 @@ +// +// 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.Cdn.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the parameters for the url redirect action. + /// + public partial class UrlRedirectActionParameters + { + /// + /// Initializes a new instance of the UrlRedirectActionParameters + /// class. + /// + public UrlRedirectActionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UrlRedirectActionParameters + /// class. + /// + /// The redirect type the rule will use when + /// redirecting traffic. Possible values include: 'Moved', 'Found', + /// 'TemporaryRedirect', 'PermanentRedirect' + /// Protocol to use for the redirect. + /// The default value is MatchRequest. Possible values include: + /// 'MatchRequest', 'Http', 'Https' + /// The full path to redirect. Path cannot be + /// empty and must start with /. Leave empty to use the incoming path + /// as destination path. + /// Host to redirect. Leave empty to use + /// use the incoming host as the destination host. + /// The set of query strings to be + /// placed in the redirect URL. Setting this value would replace any + /// existing query string; leave empty to preserve the incoming query + /// string. Query string must be in <key>=<value> format. ? + /// and & will be added automatically so do not include + /// them. + /// Fragment to add to the redirect URL. + /// Fragment is the part of the URL that comes after #. Do not include + /// the #. + public UrlRedirectActionParameters(string redirectType, string destinationProtocol = default(string), string customPath = default(string), string customHostname = default(string), string customQueryString = default(string), string customFragment = default(string)) + { + RedirectType = redirectType; + DestinationProtocol = destinationProtocol; + CustomPath = customPath; + CustomHostname = customHostname; + CustomQueryString = customQueryString; + CustomFragment = customFragment; + CustomInit(); + } + /// + /// Static constructor for UrlRedirectActionParameters class. + /// + static UrlRedirectActionParameters() + { + Odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the redirect type the rule will use when redirecting + /// traffic. Possible values include: 'Moved', 'Found', + /// 'TemporaryRedirect', 'PermanentRedirect' + /// + [JsonProperty(PropertyName = "redirectType")] + public string RedirectType { get; set; } + + /// + /// Gets or sets protocol to use for the redirect. The default value is + /// MatchRequest. Possible values include: 'MatchRequest', 'Http', + /// 'Https' + /// + [JsonProperty(PropertyName = "destinationProtocol")] + public string DestinationProtocol { get; set; } + + /// + /// Gets or sets the full path to redirect. Path cannot be empty and + /// must start with /. Leave empty to use the incoming path as + /// destination path. + /// + [JsonProperty(PropertyName = "customPath")] + public string CustomPath { get; set; } + + /// + /// Gets or sets host to redirect. Leave empty to use use the incoming + /// host as the destination host. + /// + [JsonProperty(PropertyName = "customHostname")] + public string CustomHostname { get; set; } + + /// + /// Gets or sets the set of query strings to be placed in the redirect + /// URL. Setting this value would replace any existing query string; + /// leave empty to preserve the incoming query string. Query string + /// must be in &lt;key&gt;=&lt;value&gt; format. ? and + /// &amp; will be added automatically so do not include them. + /// + [JsonProperty(PropertyName = "customQueryString")] + public string CustomQueryString { get; set; } + + /// + /// Gets or sets fragment to add to the redirect URL. Fragment is the + /// part of the URL that comes after #. Do not include the #. + /// + [JsonProperty(PropertyName = "customFragment")] + public string CustomFragment { get; set; } + + /// + /// + [JsonProperty(PropertyName = "@odata.type")] + public static string Odatatype { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RedirectType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RedirectType"); + } + } + } +} diff --git a/src/SDKs/Cdn/Management.Cdn/Generated/SdkInfo_CdnManagementClient.cs b/src/SDKs/Cdn/Management.Cdn/Generated/SdkInfo_CdnManagementClient.cs index 8502b18db894..1c3c39519e6f 100644 --- a/src/SDKs/Cdn/Management.Cdn/Generated/SdkInfo_CdnManagementClient.cs +++ b/src/SDKs/Cdn/Management.Cdn/Generated/SdkInfo_CdnManagementClient.cs @@ -19,16 +19,16 @@ public static IEnumerable> ApiInfo_CdnManagementCl { return new Tuple[] { - new Tuple("Cdn", "CheckNameAvailability", "2017-10-12"), - new Tuple("Cdn", "CheckNameAvailabilityWithSubscription", "2017-10-12"), - new Tuple("Cdn", "CustomDomains", "2017-10-12"), - new Tuple("Cdn", "EdgeNodes", "2017-10-12"), - new Tuple("Cdn", "Endpoints", "2017-10-12"), - new Tuple("Cdn", "Operations", "2017-10-12"), - new Tuple("Cdn", "Origins", "2017-10-12"), - new Tuple("Cdn", "Profiles", "2017-10-12"), - new Tuple("Cdn", "ResourceUsage", "2017-10-12"), - new Tuple("Cdn", "ValidateProbe", "2017-10-12"), + new Tuple("Cdn", "CheckNameAvailability", "2019-04-15"), + new Tuple("Cdn", "CheckNameAvailabilityWithSubscription", "2019-04-15"), + new Tuple("Cdn", "CustomDomains", "2019-04-15"), + new Tuple("Cdn", "EdgeNodes", "2019-04-15"), + new Tuple("Cdn", "Endpoints", "2019-04-15"), + new Tuple("Cdn", "Operations", "2019-04-15"), + new Tuple("Cdn", "Origins", "2019-04-15"), + new Tuple("Cdn", "Profiles", "2019-04-15"), + new Tuple("Cdn", "ResourceUsage", "2019-04-15"), + new Tuple("Cdn", "ValidateProbe", "2019-04-15"), }.AsEnumerable(); } }