diff --git a/sdk/cdn/azure-mgmt-cdn/README.rst b/sdk/cdn/azure-mgmt-cdn/README.rst index 860062d8cab1..ef5eb136d1c6 100644 --- a/sdk/cdn/azure-mgmt-cdn/README.rst +++ b/sdk/cdn/azure-mgmt-cdn/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure CDN Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py index cba63c568f39..39e32aa444b9 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py @@ -60,7 +60,7 @@ def __init__( class CdnManagementClient(SDKClient): - """Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. + """Cdn Management Client :ivar config: Configuration for client. :vartype config: CdnManagementClientConfiguration @@ -95,7 +95,7 @@ def __init__( super(CdnManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-10-12' + self.api_version = '2019-04-15' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index 2e382b4c0864..fb031c5c090f 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -18,24 +18,57 @@ from .deep_created_origin_py3 import DeepCreatedOrigin from .endpoint_py3 import Endpoint from .geo_filter_py3 import GeoFilter - from .delivery_rule_action_py3 import DeliveryRuleAction from .delivery_rule_condition_py3 import DeliveryRuleCondition + from .delivery_rule_action_py3 import DeliveryRuleAction from .delivery_rule_py3 import DeliveryRule from .endpoint_properties_update_parameters_delivery_policy_py3 import EndpointPropertiesUpdateParametersDeliveryPolicy from .endpoint_update_parameters_py3 import EndpointUpdateParameters - from .url_path_condition_parameters_py3 import UrlPathConditionParameters + from .remote_address_match_condition_parameters_py3 import RemoteAddressMatchConditionParameters + from .delivery_rule_remote_address_condition_py3 import DeliveryRuleRemoteAddressCondition + from .request_method_match_condition_parameters_py3 import RequestMethodMatchConditionParameters + from .delivery_rule_request_method_condition_py3 import DeliveryRuleRequestMethodCondition + from .query_string_match_condition_parameters_py3 import QueryStringMatchConditionParameters + from .delivery_rule_query_string_condition_py3 import DeliveryRuleQueryStringCondition + from .post_args_match_condition_parameters_py3 import PostArgsMatchConditionParameters + from .delivery_rule_post_args_condition_py3 import DeliveryRulePostArgsCondition + from .request_uri_match_condition_parameters_py3 import RequestUriMatchConditionParameters + from .delivery_rule_request_uri_condition_py3 import DeliveryRuleRequestUriCondition + from .request_header_match_condition_parameters_py3 import RequestHeaderMatchConditionParameters + from .delivery_rule_request_header_condition_py3 import DeliveryRuleRequestHeaderCondition + from .request_body_match_condition_parameters_py3 import RequestBodyMatchConditionParameters + from .delivery_rule_request_body_condition_py3 import DeliveryRuleRequestBodyCondition + from .request_scheme_match_condition_parameters_py3 import RequestSchemeMatchConditionParameters + from .delivery_rule_request_scheme_condition_py3 import DeliveryRuleRequestSchemeCondition + from .url_path_match_condition_parameters_py3 import UrlPathMatchConditionParameters from .delivery_rule_url_path_condition_py3 import DeliveryRuleUrlPathCondition - from .url_file_extension_condition_parameters_py3 import UrlFileExtensionConditionParameters + from .url_file_extension_match_condition_parameters_py3 import UrlFileExtensionMatchConditionParameters from .delivery_rule_url_file_extension_condition_py3 import DeliveryRuleUrlFileExtensionCondition + from .url_file_name_match_condition_parameters_py3 import UrlFileNameMatchConditionParameters + from .delivery_rule_url_file_name_condition_py3 import DeliveryRuleUrlFileNameCondition + from .http_version_match_condition_parameters_py3 import HttpVersionMatchConditionParameters + from .delivery_rule_http_version_condition_py3 import DeliveryRuleHttpVersionCondition + from .cookies_match_condition_parameters_py3 import CookiesMatchConditionParameters + from .delivery_rule_cookies_condition_py3 import DeliveryRuleCookiesCondition + from .is_device_match_condition_parameters_py3 import IsDeviceMatchConditionParameters + from .delivery_rule_is_device_condition_py3 import DeliveryRuleIsDeviceCondition + from .url_redirect_action_parameters_py3 import UrlRedirectActionParameters + from .url_redirect_action_py3 import UrlRedirectAction + from .url_rewrite_action_parameters_py3 import UrlRewriteActionParameters + from .url_rewrite_action_py3 import UrlRewriteAction + from .header_action_parameters_py3 import HeaderActionParameters + from .delivery_rule_request_header_action_py3 import DeliveryRuleRequestHeaderAction + from .delivery_rule_response_header_action_py3 import DeliveryRuleResponseHeaderAction from .cache_expiration_action_parameters_py3 import CacheExpirationActionParameters from .delivery_rule_cache_expiration_action_py3 import DeliveryRuleCacheExpirationAction + from .cache_key_query_string_action_parameters_py3 import CacheKeyQueryStringActionParameters + from .delivery_rule_cache_key_query_string_action_py3 import DeliveryRuleCacheKeyQueryStringAction from .purge_parameters_py3 import PurgeParameters from .load_parameters_py3 import LoadParameters from .origin_py3 import Origin from .origin_update_parameters_py3 import OriginUpdateParameters + from .custom_domain_https_parameters_py3 import CustomDomainHttpsParameters from .custom_domain_py3 import CustomDomain from .custom_domain_parameters_py3 import CustomDomainParameters - from .custom_domain_https_parameters_py3 import CustomDomainHttpsParameters from .cdn_certificate_source_parameters_py3 import CdnCertificateSourceParameters from .cdn_managed_https_parameters_py3 import CdnManagedHttpsParameters from .key_vault_certificate_source_parameters_py3 import KeyVaultCertificateSourceParameters @@ -65,24 +98,57 @@ from .deep_created_origin import DeepCreatedOrigin from .endpoint import Endpoint from .geo_filter import GeoFilter - from .delivery_rule_action import DeliveryRuleAction from .delivery_rule_condition import DeliveryRuleCondition + from .delivery_rule_action import DeliveryRuleAction from .delivery_rule import DeliveryRule from .endpoint_properties_update_parameters_delivery_policy import EndpointPropertiesUpdateParametersDeliveryPolicy from .endpoint_update_parameters import EndpointUpdateParameters - from .url_path_condition_parameters import UrlPathConditionParameters + from .remote_address_match_condition_parameters import RemoteAddressMatchConditionParameters + from .delivery_rule_remote_address_condition import DeliveryRuleRemoteAddressCondition + from .request_method_match_condition_parameters import RequestMethodMatchConditionParameters + from .delivery_rule_request_method_condition import DeliveryRuleRequestMethodCondition + from .query_string_match_condition_parameters import QueryStringMatchConditionParameters + from .delivery_rule_query_string_condition import DeliveryRuleQueryStringCondition + from .post_args_match_condition_parameters import PostArgsMatchConditionParameters + from .delivery_rule_post_args_condition import DeliveryRulePostArgsCondition + from .request_uri_match_condition_parameters import RequestUriMatchConditionParameters + from .delivery_rule_request_uri_condition import DeliveryRuleRequestUriCondition + from .request_header_match_condition_parameters import RequestHeaderMatchConditionParameters + from .delivery_rule_request_header_condition import DeliveryRuleRequestHeaderCondition + from .request_body_match_condition_parameters import RequestBodyMatchConditionParameters + from .delivery_rule_request_body_condition import DeliveryRuleRequestBodyCondition + from .request_scheme_match_condition_parameters import RequestSchemeMatchConditionParameters + from .delivery_rule_request_scheme_condition import DeliveryRuleRequestSchemeCondition + from .url_path_match_condition_parameters import UrlPathMatchConditionParameters from .delivery_rule_url_path_condition import DeliveryRuleUrlPathCondition - from .url_file_extension_condition_parameters import UrlFileExtensionConditionParameters + from .url_file_extension_match_condition_parameters import UrlFileExtensionMatchConditionParameters from .delivery_rule_url_file_extension_condition import DeliveryRuleUrlFileExtensionCondition + from .url_file_name_match_condition_parameters import UrlFileNameMatchConditionParameters + from .delivery_rule_url_file_name_condition import DeliveryRuleUrlFileNameCondition + from .http_version_match_condition_parameters import HttpVersionMatchConditionParameters + from .delivery_rule_http_version_condition import DeliveryRuleHttpVersionCondition + from .cookies_match_condition_parameters import CookiesMatchConditionParameters + from .delivery_rule_cookies_condition import DeliveryRuleCookiesCondition + from .is_device_match_condition_parameters import IsDeviceMatchConditionParameters + from .delivery_rule_is_device_condition import DeliveryRuleIsDeviceCondition + from .url_redirect_action_parameters import UrlRedirectActionParameters + from .url_redirect_action import UrlRedirectAction + from .url_rewrite_action_parameters import UrlRewriteActionParameters + from .url_rewrite_action import UrlRewriteAction + from .header_action_parameters import HeaderActionParameters + from .delivery_rule_request_header_action import DeliveryRuleRequestHeaderAction + from .delivery_rule_response_header_action import DeliveryRuleResponseHeaderAction from .cache_expiration_action_parameters import CacheExpirationActionParameters from .delivery_rule_cache_expiration_action import DeliveryRuleCacheExpirationAction + from .cache_key_query_string_action_parameters import CacheKeyQueryStringActionParameters + from .delivery_rule_cache_key_query_string_action import DeliveryRuleCacheKeyQueryStringAction from .purge_parameters import PurgeParameters from .load_parameters import LoadParameters from .origin import Origin from .origin_update_parameters import OriginUpdateParameters + from .custom_domain_https_parameters import CustomDomainHttpsParameters from .custom_domain import CustomDomain from .custom_domain_parameters import CustomDomainParameters - from .custom_domain_https_parameters import CustomDomainHttpsParameters from .cdn_certificate_source_parameters import CdnCertificateSourceParameters from .cdn_managed_https_parameters import CdnManagedHttpsParameters from .key_vault_certificate_source_parameters import KeyVaultCertificateSourceParameters @@ -117,11 +183,28 @@ EndpointResourceState, QueryStringCachingBehavior, GeoFilterActions, + RemoteAddressOperator, + Transform, + QueryStringOperator, + PostArgsOperator, + RequestUriOperator, + RequestHeaderOperator, + RequestBodyOperator, + UrlPathOperator, + UrlFileExtensionOperator, + UrlFileNameOperator, + CookiesOperator, + RedirectType, + DestinationProtocol, + HeaderAction, + CacheBehavior, + QueryStringBehavior, OriginResourceState, CustomDomainResourceState, CustomHttpsProvisioningState, CustomHttpsProvisioningSubstate, ProtocolType, + MinimumTlsVersion, CertificateType, ResourceType, ) @@ -135,24 +218,57 @@ 'DeepCreatedOrigin', 'Endpoint', 'GeoFilter', - 'DeliveryRuleAction', 'DeliveryRuleCondition', + 'DeliveryRuleAction', 'DeliveryRule', 'EndpointPropertiesUpdateParametersDeliveryPolicy', 'EndpointUpdateParameters', - 'UrlPathConditionParameters', + 'RemoteAddressMatchConditionParameters', + 'DeliveryRuleRemoteAddressCondition', + 'RequestMethodMatchConditionParameters', + 'DeliveryRuleRequestMethodCondition', + 'QueryStringMatchConditionParameters', + 'DeliveryRuleQueryStringCondition', + 'PostArgsMatchConditionParameters', + 'DeliveryRulePostArgsCondition', + 'RequestUriMatchConditionParameters', + 'DeliveryRuleRequestUriCondition', + 'RequestHeaderMatchConditionParameters', + 'DeliveryRuleRequestHeaderCondition', + 'RequestBodyMatchConditionParameters', + 'DeliveryRuleRequestBodyCondition', + 'RequestSchemeMatchConditionParameters', + 'DeliveryRuleRequestSchemeCondition', + 'UrlPathMatchConditionParameters', 'DeliveryRuleUrlPathCondition', - 'UrlFileExtensionConditionParameters', + 'UrlFileExtensionMatchConditionParameters', 'DeliveryRuleUrlFileExtensionCondition', + 'UrlFileNameMatchConditionParameters', + 'DeliveryRuleUrlFileNameCondition', + 'HttpVersionMatchConditionParameters', + 'DeliveryRuleHttpVersionCondition', + 'CookiesMatchConditionParameters', + 'DeliveryRuleCookiesCondition', + 'IsDeviceMatchConditionParameters', + 'DeliveryRuleIsDeviceCondition', + 'UrlRedirectActionParameters', + 'UrlRedirectAction', + 'UrlRewriteActionParameters', + 'UrlRewriteAction', + 'HeaderActionParameters', + 'DeliveryRuleRequestHeaderAction', + 'DeliveryRuleResponseHeaderAction', 'CacheExpirationActionParameters', 'DeliveryRuleCacheExpirationAction', + 'CacheKeyQueryStringActionParameters', + 'DeliveryRuleCacheKeyQueryStringAction', 'PurgeParameters', 'LoadParameters', 'Origin', 'OriginUpdateParameters', + 'CustomDomainHttpsParameters', 'CustomDomain', 'CustomDomainParameters', - 'CustomDomainHttpsParameters', 'CdnCertificateSourceParameters', 'CdnManagedHttpsParameters', 'KeyVaultCertificateSourceParameters', @@ -186,11 +302,28 @@ 'EndpointResourceState', 'QueryStringCachingBehavior', 'GeoFilterActions', + 'RemoteAddressOperator', + 'Transform', + 'QueryStringOperator', + 'PostArgsOperator', + 'RequestUriOperator', + 'RequestHeaderOperator', + 'RequestBodyOperator', + 'UrlPathOperator', + 'UrlFileExtensionOperator', + 'UrlFileNameOperator', + 'CookiesOperator', + 'RedirectType', + 'DestinationProtocol', + 'HeaderAction', + 'CacheBehavior', + 'QueryStringBehavior', 'OriginResourceState', 'CustomDomainResourceState', 'CustomHttpsProvisioningState', 'CustomHttpsProvisioningSubstate', 'ProtocolType', + 'MinimumTlsVersion', 'CertificateType', 'ResourceType', ] diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py index 43cd9fa3b5cf..e1d2ac1f4abc 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py @@ -21,12 +21,12 @@ class CacheExpirationActionParameters(Model): All required parameters must be populated in order to send to Azure. :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + . :vartype odatatype: str - :param cache_behavior: Required. Caching behavior for the requests that - include query strings. Possible values include: 'BypassCache', 'Override', - 'SetIfMissing' - :type cache_behavior: str or ~azure.mgmt.cdn.models.enum + :param cache_behavior: Required. Caching behavior for the requests. + Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str @@ -48,7 +48,7 @@ class CacheExpirationActionParameters(Model): 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, } - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" cache_type = "All" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py index 1b178db8df95..52bb5de4510c 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py @@ -21,12 +21,12 @@ class CacheExpirationActionParameters(Model): All required parameters must be populated in order to send to Azure. :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + . :vartype odatatype: str - :param cache_behavior: Required. Caching behavior for the requests that - include query strings. Possible values include: 'BypassCache', 'Override', - 'SetIfMissing' - :type cache_behavior: str or ~azure.mgmt.cdn.models.enum + :param cache_behavior: Required. Caching behavior for the requests. + Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str @@ -48,7 +48,7 @@ class CacheExpirationActionParameters(Model): 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, } - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" cache_type = "All" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters.py new file mode 100644 index 000000000000..752f09583558 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheKeyQueryStringActionParameters(Model): + """Defines the parameters for the cache-key query string action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + . + :vartype odatatype: str + :param query_string_behavior: Required. Caching behavior for the requests. + Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + :type query_string_behavior: str or + ~azure.mgmt.cdn.models.QueryStringBehavior + :param query_parameters: query parameters to include or exclude (comma + separated). + :type query_parameters: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'query_string_behavior': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'query_string_behavior': {'key': 'queryStringBehavior', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + + def __init__(self, **kwargs): + super(CacheKeyQueryStringActionParameters, self).__init__(**kwargs) + self.query_string_behavior = kwargs.get('query_string_behavior', None) + self.query_parameters = kwargs.get('query_parameters', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters_py3.py new file mode 100644 index 000000000000..9e617cb59659 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheKeyQueryStringActionParameters(Model): + """Defines the parameters for the cache-key query string action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + . + :vartype odatatype: str + :param query_string_behavior: Required. Caching behavior for the requests. + Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + :type query_string_behavior: str or + ~azure.mgmt.cdn.models.QueryStringBehavior + :param query_parameters: query parameters to include or exclude (comma + separated). + :type query_parameters: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'query_string_behavior': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'query_string_behavior': {'key': 'queryStringBehavior', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + + def __init__(self, *, query_string_behavior, query_parameters: str=None, **kwargs) -> None: + super(CacheKeyQueryStringActionParameters, self).__init__(**kwargs) + self.query_string_behavior = query_string_behavior + self.query_parameters = query_parameters diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py index 3c9a2bcca295..0008581a92bc 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py @@ -22,6 +22,9 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,6 +41,7 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'CdnCertificateSourceParameters'}, } diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py index 909a93392f89..e0e711886f6c 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py @@ -22,6 +22,9 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,11 +41,12 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'CdnCertificateSourceParameters'}, } - def __init__(self, *, protocol_type, certificate_source_parameters, **kwargs) -> None: - super(CdnManagedHttpsParameters, self).__init__(protocol_type=protocol_type, **kwargs) + def __init__(self, *, protocol_type, certificate_source_parameters, minimum_tls_version=None, **kwargs) -> None: + super(CdnManagedHttpsParameters, self).__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs) self.certificate_source_parameters = certificate_source_parameters self.certificate_source = 'Cdn' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py index 0a15a6028eaf..ed40189f511e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py @@ -20,6 +20,7 @@ class SkuName(str, Enum): standard_akamai = "Standard_Akamai" standard_china_cdn = "Standard_ChinaCdn" standard_microsoft = "Standard_Microsoft" + premium_china_cdn = "Premium_ChinaCdn" class ProfileResourceState(str, Enum): @@ -63,6 +64,174 @@ class GeoFilterActions(str, Enum): allow = "Allow" +class RemoteAddressOperator(str, Enum): + + any = "Any" + ip_match = "IPMatch" + geo_match = "GeoMatch" + + +class Transform(str, Enum): + + lowercase = "Lowercase" + uppercase = "Uppercase" + + +class QueryStringOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class PostArgsOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RequestUriOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RequestHeaderOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RequestBodyOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class UrlPathOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + wildcard = "Wildcard" + + +class UrlFileExtensionOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class UrlFileNameOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class CookiesOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RedirectType(str, Enum): + + moved = "Moved" + found = "Found" + temporary_redirect = "TemporaryRedirect" + permanent_redirect = "PermanentRedirect" + + +class DestinationProtocol(str, Enum): + + match_request = "MatchRequest" + http = "Http" + https = "Https" + + +class HeaderAction(str, Enum): + + append = "Append" + overwrite = "Overwrite" + delete = "Delete" + + +class CacheBehavior(str, Enum): + + bypass_cache = "BypassCache" + override = "Override" + set_if_missing = "SetIfMissing" + + +class QueryStringBehavior(str, Enum): + + include = "Include" + include_all = "IncludeAll" + exclude = "Exclude" + exclude_all = "ExcludeAll" + + class OriginResourceState(str, Enum): creating = "Creating" @@ -106,6 +275,13 @@ class ProtocolType(str, Enum): ip_based = "IPBased" +class MinimumTlsVersion(str, Enum): + + none = "None" + tls10 = "TLS10" + tls12 = "TLS12" + + class CertificateType(str, Enum): shared = "Shared" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters.py new file mode 100644 index 000000000000..1241bfc2e467 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CookiesMatchConditionParameters(Model): + """Defines the parameters for Cookies match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of Cookies to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.CookiesOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" + + def __init__(self, **kwargs): + super(CookiesMatchConditionParameters, self).__init__(**kwargs) + self.selector = kwargs.get('selector', None) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters_py3.py new file mode 100644 index 000000000000..2a7d45be90bf --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CookiesMatchConditionParameters(Model): + """Defines the parameters for Cookies match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of Cookies to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.CookiesOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" + + def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(CookiesMatchConditionParameters, self).__init__(**kwargs) + self.selector = selector + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py index 277792da086a..a1b17189dc38 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py @@ -50,6 +50,10 @@ class CustomDomain(ProxyResource): 'CertificateDeleted' :vartype custom_https_provisioning_substate: str or ~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate + :param custom_https_parameters: Certificate parameters for securing custom + HTTPS + :type custom_https_parameters: + ~azure.mgmt.cdn.models.CustomDomainHttpsParameters :param validation_data: Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. @@ -77,6 +81,7 @@ class CustomDomain(ProxyResource): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'}, 'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'}, + 'custom_https_parameters': {'key': 'properties.customHttpsParameters', 'type': 'CustomDomainHttpsParameters'}, 'validation_data': {'key': 'properties.validationData', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -87,5 +92,6 @@ def __init__(self, **kwargs): self.resource_state = None self.custom_https_provisioning_state = None self.custom_https_provisioning_substate = None + self.custom_https_parameters = kwargs.get('custom_https_parameters', None) self.validation_data = kwargs.get('validation_data', None) self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py index c854a87ff851..14fd42bab2b9 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py @@ -24,6 +24,9 @@ class CustomDomainHttpsParameters(Model): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str """ @@ -35,6 +38,7 @@ class CustomDomainHttpsParameters(Model): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, } @@ -45,4 +49,5 @@ class CustomDomainHttpsParameters(Model): def __init__(self, **kwargs): super(CustomDomainHttpsParameters, self).__init__(**kwargs) self.protocol_type = kwargs.get('protocol_type', None) + self.minimum_tls_version = kwargs.get('minimum_tls_version', None) self.certificate_source = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py index 97bfd1838cba..ca7c8530f1cf 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py @@ -24,6 +24,9 @@ class CustomDomainHttpsParameters(Model): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str """ @@ -35,6 +38,7 @@ class CustomDomainHttpsParameters(Model): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, } @@ -42,7 +46,8 @@ class CustomDomainHttpsParameters(Model): 'certificate_source': {'Cdn': 'CdnManagedHttpsParameters', 'AzureKeyVault': 'UserManagedHttpsParameters'} } - def __init__(self, *, protocol_type, **kwargs) -> None: + def __init__(self, *, protocol_type, minimum_tls_version=None, **kwargs) -> None: super(CustomDomainHttpsParameters, self).__init__(**kwargs) self.protocol_type = protocol_type + self.minimum_tls_version = minimum_tls_version self.certificate_source = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py index b1426b283645..ffc86adc1cec 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py @@ -50,6 +50,10 @@ class CustomDomain(ProxyResource): 'CertificateDeleted' :vartype custom_https_provisioning_substate: str or ~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate + :param custom_https_parameters: Certificate parameters for securing custom + HTTPS + :type custom_https_parameters: + ~azure.mgmt.cdn.models.CustomDomainHttpsParameters :param validation_data: Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. @@ -77,15 +81,17 @@ class CustomDomain(ProxyResource): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'}, 'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'}, + 'custom_https_parameters': {'key': 'properties.customHttpsParameters', 'type': 'CustomDomainHttpsParameters'}, 'validation_data': {'key': 'properties.validationData', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, host_name: str, validation_data: str=None, **kwargs) -> None: + def __init__(self, *, host_name: str, custom_https_parameters=None, validation_data: str=None, **kwargs) -> None: super(CustomDomain, self).__init__(**kwargs) self.host_name = host_name self.resource_state = None self.custom_https_provisioning_state = None self.custom_https_provisioning_substate = None + self.custom_https_parameters = custom_https_parameters self.validation_data = validation_data self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py index 63f57602843d..52fe9f00905b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py @@ -17,18 +17,20 @@ class DeliveryRule(Model): All required parameters must be populated in order to send to Azure. + :param name: Name of the rule + :type name: str :param order: Required. 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 order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. :type order: int - :param actions: Required. A list of actions that are executed when all the - conditions of a rule are satisfied. - :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] :param conditions: A list of conditions that must be matched for the actions to be executed :type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] """ _validation = { @@ -37,13 +39,15 @@ class DeliveryRule(Model): } _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, 'order': {'key': 'order', 'type': 'int'}, - 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, } def __init__(self, **kwargs): super(DeliveryRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) self.order = kwargs.get('order', None) - self.actions = kwargs.get('actions', None) self.conditions = kwargs.get('conditions', None) + self.actions = kwargs.get('actions', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py index c3bd94a0ea7e..ad9d1b8ca897 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py @@ -16,7 +16,9 @@ class DeliveryRuleAction(Model): """An action for the delivery rule. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeliveryRuleCacheExpirationAction + sub-classes are: UrlRedirectAction, UrlRewriteAction, + DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction, + DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction All required parameters must be populated in order to send to Azure. @@ -33,7 +35,7 @@ class DeliveryRuleAction(Model): } _subtype_map = { - 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + 'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'} } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py index 10d60ce7ce31..619da8a0bfe5 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py @@ -16,7 +16,9 @@ class DeliveryRuleAction(Model): """An action for the delivery rule. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeliveryRuleCacheExpirationAction + sub-classes are: UrlRedirectAction, UrlRewriteAction, + DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction, + DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction All required parameters must be populated in order to send to Azure. @@ -33,7 +35,7 @@ class DeliveryRuleAction(Model): } _subtype_map = { - 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + 'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'} } def __init__(self, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action.py new file mode 100644 index 000000000000..f3b4084480fb --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleAction): + """Defines the cache-key query string action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: + ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheKeyQueryStringActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleCacheKeyQueryStringAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'CacheKeyQueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action_py3.py new file mode 100644 index 000000000000..751ee6a12b70 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleAction): + """Defines the cache-key query string action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: + ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheKeyQueryStringActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleCacheKeyQueryStringAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'CacheKeyQueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py index ad81c9f7b533..c56928a27d14 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py @@ -16,8 +16,14 @@ class DeliveryRuleCondition(Model): """A condition for the delivery rule. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeliveryRuleUrlPathCondition, - DeliveryRuleUrlFileExtensionCondition + sub-classes are: DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestMethodCondition, DeliveryRuleQueryStringCondition, + DeliveryRulePostArgsCondition, DeliveryRuleRequestUriCondition, + DeliveryRuleRequestHeaderCondition, DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestSchemeCondition, DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, + DeliveryRuleHttpVersionCondition, DeliveryRuleCookiesCondition, + DeliveryRuleIsDeviceCondition All required parameters must be populated in order to send to Azure. @@ -34,7 +40,7 @@ class DeliveryRuleCondition(Model): } _subtype_map = { - 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + 'name': {'RemoteAddress': 'DeliveryRuleRemoteAddressCondition', 'RequestMethod': 'DeliveryRuleRequestMethodCondition', 'QueryString': 'DeliveryRuleQueryStringCondition', 'PostArgs': 'DeliveryRulePostArgsCondition', 'RequestUri': 'DeliveryRuleRequestUriCondition', 'RequestHeader': 'DeliveryRuleRequestHeaderCondition', 'RequestBody': 'DeliveryRuleRequestBodyCondition', 'RequestScheme': 'DeliveryRuleRequestSchemeCondition', 'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition', 'UrlFileName': 'DeliveryRuleUrlFileNameCondition', 'HttpVersion': 'DeliveryRuleHttpVersionCondition', 'Cookies': 'DeliveryRuleCookiesCondition', 'IsDevice': 'DeliveryRuleIsDeviceCondition'} } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py index e50925b7db4f..10f476c36c4e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py @@ -16,8 +16,14 @@ class DeliveryRuleCondition(Model): """A condition for the delivery rule. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeliveryRuleUrlPathCondition, - DeliveryRuleUrlFileExtensionCondition + sub-classes are: DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestMethodCondition, DeliveryRuleQueryStringCondition, + DeliveryRulePostArgsCondition, DeliveryRuleRequestUriCondition, + DeliveryRuleRequestHeaderCondition, DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestSchemeCondition, DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, + DeliveryRuleHttpVersionCondition, DeliveryRuleCookiesCondition, + DeliveryRuleIsDeviceCondition All required parameters must be populated in order to send to Azure. @@ -34,7 +40,7 @@ class DeliveryRuleCondition(Model): } _subtype_map = { - 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + 'name': {'RemoteAddress': 'DeliveryRuleRemoteAddressCondition', 'RequestMethod': 'DeliveryRuleRequestMethodCondition', 'QueryString': 'DeliveryRuleQueryStringCondition', 'PostArgs': 'DeliveryRulePostArgsCondition', 'RequestUri': 'DeliveryRuleRequestUriCondition', 'RequestHeader': 'DeliveryRuleRequestHeaderCondition', 'RequestBody': 'DeliveryRuleRequestBodyCondition', 'RequestScheme': 'DeliveryRuleRequestSchemeCondition', 'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition', 'UrlFileName': 'DeliveryRuleUrlFileNameCondition', 'HttpVersion': 'DeliveryRuleHttpVersionCondition', 'Cookies': 'DeliveryRuleCookiesCondition', 'IsDevice': 'DeliveryRuleIsDeviceCondition'} } def __init__(self, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition.py new file mode 100644 index 000000000000..bf238f4612f0 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleCookiesCondition(DeliveryRuleCondition): + """Defines the Cookies condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CookiesMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleCookiesCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'Cookies' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition_py3.py new file mode 100644 index 000000000000..1363dc508671 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleCookiesCondition(DeliveryRuleCondition): + """Defines the Cookies condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CookiesMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleCookiesCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'Cookies' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition.py new file mode 100644 index 000000000000..2e0bf73467c5 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleHttpVersionCondition(DeliveryRuleCondition): + """Defines the HttpVersion condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HttpVersionMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleHttpVersionCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'HttpVersion' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition_py3.py new file mode 100644 index 000000000000..302e8f316b2b --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleHttpVersionCondition(DeliveryRuleCondition): + """Defines the HttpVersion condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HttpVersionMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleHttpVersionCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'HttpVersion' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition.py new file mode 100644 index 000000000000..d1c0fb170aa6 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleIsDeviceCondition(DeliveryRuleCondition): + """Defines the IsDevice condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'IsDeviceMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleIsDeviceCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'IsDevice' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition_py3.py new file mode 100644 index 000000000000..6a8c08f30996 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleIsDeviceCondition(DeliveryRuleCondition): + """Defines the IsDevice condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'IsDeviceMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleIsDeviceCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'IsDevice' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition.py new file mode 100644 index 000000000000..d568da036b5b --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRulePostArgsCondition(DeliveryRuleCondition): + """Defines the PostArgs condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'PostArgsMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRulePostArgsCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'PostArgs' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition_py3.py new file mode 100644 index 000000000000..3818a6a97da3 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRulePostArgsCondition(DeliveryRuleCondition): + """Defines the PostArgs condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'PostArgsMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRulePostArgsCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'PostArgs' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py index b6f1c33b003e..04a68bf60e00 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py @@ -17,18 +17,20 @@ class DeliveryRule(Model): All required parameters must be populated in order to send to Azure. + :param name: Name of the rule + :type name: str :param order: Required. 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 order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. :type order: int - :param actions: Required. A list of actions that are executed when all the - conditions of a rule are satisfied. - :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] :param conditions: A list of conditions that must be matched for the actions to be executed :type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] """ _validation = { @@ -37,13 +39,15 @@ class DeliveryRule(Model): } _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, 'order': {'key': 'order', 'type': 'int'}, - 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, } - def __init__(self, *, order: int, actions, conditions=None, **kwargs) -> None: + def __init__(self, *, order: int, actions, name: str=None, conditions=None, **kwargs) -> None: super(DeliveryRule, self).__init__(**kwargs) + self.name = name self.order = order - self.actions = actions self.conditions = conditions + self.actions = actions diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition.py new file mode 100644 index 000000000000..f41113071233 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleQueryStringCondition(DeliveryRuleCondition): + """Defines the QueryString condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.QueryStringMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'QueryStringMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleQueryStringCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'QueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition_py3.py new file mode 100644 index 000000000000..676429677afc --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleQueryStringCondition(DeliveryRuleCondition): + """Defines the QueryString condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.QueryStringMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'QueryStringMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleQueryStringCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'QueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition.py new file mode 100644 index 000000000000..1516e6c1a653 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRemoteAddressCondition(DeliveryRuleCondition): + """Defines the RemoteAddress condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RemoteAddressMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRemoteAddressCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RemoteAddress' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition_py3.py new file mode 100644 index 000000000000..f16ee6c7d747 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRemoteAddressCondition(DeliveryRuleCondition): + """Defines the RemoteAddress condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RemoteAddressMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRemoteAddressCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RemoteAddress' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition.py new file mode 100644 index 000000000000..dcd2a953dac6 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestBodyCondition(DeliveryRuleCondition): + """Defines the RequestBody condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestBodyMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestBodyCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestBody' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition_py3.py new file mode 100644 index 000000000000..2be0ee11dbc5 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestBodyCondition(DeliveryRuleCondition): + """Defines the RequestBody condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestBodyMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestBodyCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestBody' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action.py new file mode 100644 index 000000000000..220ebe3ed1d7 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleRequestHeaderAction(DeliveryRuleAction): + """Defines the request header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestHeaderAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'ModifyRequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action_py3.py new file mode 100644 index 000000000000..ba59c15384f8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleRequestHeaderAction(DeliveryRuleAction): + """Defines the request header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestHeaderAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'ModifyRequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition.py new file mode 100644 index 000000000000..1d7a842ccff3 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestHeaderCondition(DeliveryRuleCondition): + """Defines the RequestHeader condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestHeaderMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestHeaderCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition_py3.py new file mode 100644 index 000000000000..02b41481cb4f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestHeaderCondition(DeliveryRuleCondition): + """Defines the RequestHeader condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestHeaderMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestHeaderCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition.py new file mode 100644 index 000000000000..dac7d2e667e0 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestMethodCondition(DeliveryRuleCondition): + """Defines the RequestMethod condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestMethodMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestMethodCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestMethod' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition_py3.py new file mode 100644 index 000000000000..3278d21c3703 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestMethodCondition(DeliveryRuleCondition): + """Defines the RequestMethod condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestMethodMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestMethodCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestMethod' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition.py new file mode 100644 index 000000000000..1b7bfb470331 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestSchemeCondition(DeliveryRuleCondition): + """Defines the RequestScheme condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestSchemeMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestSchemeCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestScheme' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition_py3.py new file mode 100644 index 000000000000..c669b502c72e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestSchemeCondition(DeliveryRuleCondition): + """Defines the RequestScheme condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestSchemeMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestSchemeCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestScheme' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition.py new file mode 100644 index 000000000000..ab29e129dbfa --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestUriCondition(DeliveryRuleCondition): + """Defines the RequestUri condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestUriMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestUriMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestUriCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestUri' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition_py3.py new file mode 100644 index 000000000000..6bd2728ea11d --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestUriCondition(DeliveryRuleCondition): + """Defines the RequestUri condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestUriMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestUriMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestUriCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestUri' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action.py new file mode 100644 index 000000000000..6e82420e8cf0 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleResponseHeaderAction(DeliveryRuleAction): + """Defines the response header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleResponseHeaderAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'ModifyResponseHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action_py3.py new file mode 100644 index 000000000000..700b8d51a9fd --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleResponseHeaderAction(DeliveryRuleAction): + """Defines the response header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleResponseHeaderAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'ModifyResponseHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py index d215d3cd4b2d..ccd83ada25d4 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py @@ -13,7 +13,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): - """Defines the URL file extension condition for the delivery rule. + """Defines the UrlFileExtension condition for the delivery rule. All required parameters must be populated in order to send to Azure. @@ -21,7 +21,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): :type name: str :param parameters: Required. Defines the parameters for the condition. :type parameters: - ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters """ _validation = { @@ -31,7 +31,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionMatchConditionParameters'}, } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py index f97f2cac2d0f..4af91ab748f8 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py @@ -13,7 +13,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): - """Defines the URL file extension condition for the delivery rule. + """Defines the UrlFileExtension condition for the delivery rule. All required parameters must be populated in order to send to Azure. @@ -21,7 +21,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): :type name: str :param parameters: Required. Defines the parameters for the condition. :type parameters: - ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters """ _validation = { @@ -31,7 +31,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionMatchConditionParameters'}, } def __init__(self, *, parameters, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition.py new file mode 100644 index 000000000000..2c6725e36f05 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlFileNameCondition(DeliveryRuleCondition): + """Defines the UrlFileName condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileNameMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleUrlFileNameCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlFileName' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition_py3.py new file mode 100644 index 000000000000..3a3eecb759a9 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleUrlFileNameCondition(DeliveryRuleCondition): + """Defines the UrlFileName condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileNameMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleUrlFileNameCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlFileName' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py index b3eb2578b72e..dc1721aac172 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py @@ -13,14 +13,14 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): - """Defines the URL path condition for the delivery rule. + """Defines the UrlPath condition for the delivery rule. All required parameters must be populated in order to send to Azure. :param name: Required. Constant filled by server. :type name: str :param parameters: Required. Defines the parameters for the condition. - :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + :type parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters """ _validation = { @@ -30,7 +30,7 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathMatchConditionParameters'}, } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py index 730fdcaec98a..ab667939e5a6 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py @@ -13,14 +13,14 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): - """Defines the URL path condition for the delivery rule. + """Defines the UrlPath condition for the delivery rule. All required parameters must be populated in order to send to Azure. :param name: Required. Constant filled by server. :type name: str :param parameters: Required. Defines the parameters for the condition. - :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + :type parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters """ _validation = { @@ -30,7 +30,7 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathMatchConditionParameters'}, } def __init__(self, *, parameters, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters.py new file mode 100644 index 000000000000..f82cc2e95147 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HeaderActionParameters(Model): + """Defines the parameters for the request header action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" . + :vartype odatatype: str + :param header_action: Required. Action to perform. Possible values + include: 'Append', 'Overwrite', 'Delete' + :type header_action: str or ~azure.mgmt.cdn.models.HeaderAction + :param header_name: Required. Name of the header to modify + :type header_name: str + :param value: Value for the specified action + :type value: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'header_action': {'required': True}, + 'header_name': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'header_action': {'key': 'headerAction', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + + def __init__(self, **kwargs): + super(HeaderActionParameters, self).__init__(**kwargs) + self.header_action = kwargs.get('header_action', None) + self.header_name = kwargs.get('header_name', None) + self.value = kwargs.get('value', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters_py3.py new file mode 100644 index 000000000000..368c596644dd --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HeaderActionParameters(Model): + """Defines the parameters for the request header action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" . + :vartype odatatype: str + :param header_action: Required. Action to perform. Possible values + include: 'Append', 'Overwrite', 'Delete' + :type header_action: str or ~azure.mgmt.cdn.models.HeaderAction + :param header_name: Required. Name of the header to modify + :type header_name: str + :param value: Value for the specified action + :type value: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'header_action': {'required': True}, + 'header_name': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'header_action': {'key': 'headerAction', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + + def __init__(self, *, header_action, header_name: str, value: str=None, **kwargs) -> None: + super(HeaderActionParameters, self).__init__(**kwargs) + self.header_action = header_action + self.header_name = header_name + self.value = value diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters.py new file mode 100644 index 000000000000..efa5230ad22e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpVersionMatchConditionParameters(Model): + """Defines the parameters for HttpVersion match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(HttpVersionMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters_py3.py new file mode 100644 index 000000000000..4bf328fa590f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpVersionMatchConditionParameters(Model): + """Defines the parameters for HttpVersion match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None: + super(HttpVersionMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters.py new file mode 100644 index 000000000000..04d497f7c3ab --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IsDeviceMatchConditionParameters(Model): + """Defines the parameters for IsDevice match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(IsDeviceMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters_py3.py new file mode 100644 index 000000000000..34b8edf98425 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IsDeviceMatchConditionParameters(Model): + """Defines the parameters for IsDevice match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(IsDeviceMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters.py new file mode 100644 index 000000000000..c3a5fb7e94f8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PostArgsMatchConditionParameters(Model): + """Defines the parameters for PostArgs match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of PostArg to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.PostArgsOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" + + def __init__(self, **kwargs): + super(PostArgsMatchConditionParameters, self).__init__(**kwargs) + self.selector = kwargs.get('selector', None) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters_py3.py new file mode 100644 index 000000000000..36ffaa0aadf6 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PostArgsMatchConditionParameters(Model): + """Defines the parameters for PostArgs match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of PostArg to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.PostArgsOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" + + def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(PostArgsMatchConditionParameters, self).__init__(**kwargs) + self.selector = selector + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters.py new file mode 100644 index 000000000000..78ba245ec6af --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QueryStringMatchConditionParameters(Model): + """Defines the parameters for QueryString match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.QueryStringOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" + + def __init__(self, **kwargs): + super(QueryStringMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters_py3.py new file mode 100644 index 000000000000..ffb53b0de378 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QueryStringMatchConditionParameters(Model): + """Defines the parameters for QueryString match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.QueryStringOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(QueryStringMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters.py new file mode 100644 index 000000000000..3fde65a59b3b --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteAddressMatchConditionParameters(Model): + """Defines the parameters for RemoteAddress match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'IPMatch', 'GeoMatch' + :type operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. 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. + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + + def __init__(self, **kwargs): + super(RemoteAddressMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters_py3.py new file mode 100644 index 000000000000..541b3e887968 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RemoteAddressMatchConditionParameters(Model): + """Defines the parameters for RemoteAddress match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'IPMatch', 'GeoMatch' + :type operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. 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. + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RemoteAddressMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters.py new file mode 100644 index 000000000000..2cb9327bf072 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestBodyMatchConditionParameters(Model): + """Defines the parameters for RequestBody match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" + + def __init__(self, **kwargs): + super(RequestBodyMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters_py3.py new file mode 100644 index 000000000000..8166a4bfde55 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestBodyMatchConditionParameters(Model): + """Defines the parameters for RequestBody match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RequestBodyMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters.py new file mode 100644 index 000000000000..faec33400235 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestHeaderMatchConditionParameters(Model): + """Defines the parameters for RequestHeader match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + . + :vartype odatatype: str + :param selector: Required. Name of Header to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestHeaderOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + + def __init__(self, **kwargs): + super(RequestHeaderMatchConditionParameters, self).__init__(**kwargs) + self.selector = kwargs.get('selector', None) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters_py3.py new file mode 100644 index 000000000000..66a8f764bd39 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestHeaderMatchConditionParameters(Model): + """Defines the parameters for RequestHeader match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + . + :vartype odatatype: str + :param selector: Required. Name of Header to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestHeaderOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + + def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RequestHeaderMatchConditionParameters, self).__init__(**kwargs) + self.selector = selector + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters.py new file mode 100644 index 000000000000..d8ad9563d3a8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestMethodMatchConditionParameters(Model): + """Defines the parameters for RequestMethod match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(RequestMethodMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters_py3.py new file mode 100644 index 000000000000..4f700b757235 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestMethodMatchConditionParameters(Model): + """Defines the parameters for RequestMethod match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None: + super(RequestMethodMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters.py new file mode 100644 index 000000000000..ea6d3b4a99c8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestSchemeMatchConditionParameters(Model): + """Defines the parameters for RequestScheme match conditions . + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(RequestSchemeMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters_py3.py new file mode 100644 index 000000000000..808efe258019 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestSchemeMatchConditionParameters(Model): + """Defines the parameters for RequestScheme match conditions . + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None: + super(RequestSchemeMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters.py new file mode 100644 index 000000000000..0f2024ec40dc --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestUriMatchConditionParameters(Model): + """Defines the parameters for RequestUri match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestUriOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" + + def __init__(self, **kwargs): + super(RequestUriMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters_py3.py new file mode 100644 index 000000000000..1bd5a652ce81 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestUriMatchConditionParameters(Model): + """Defines the parameters for RequestUri match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestUriOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RequestUriMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py index d230e2949fe8..967d48334237 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py @@ -18,7 +18,8 @@ class Sku(Model): :param name: Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', + 'Premium_ChinaCdn' :type name: str or ~azure.mgmt.cdn.models.SkuName """ diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py index f85c50c65e00..de502036ba68 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py @@ -18,7 +18,8 @@ class Sku(Model): :param name: Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', + 'Premium_ChinaCdn' :type name: str or ~azure.mgmt.cdn.models.SkuName """ diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py deleted file mode 100644 index d94baf881a31..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UrlFileExtensionConditionParameters(Model): - """Defines the parameters for the URL file extension condition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" - . - :vartype odatatype: str - :param extensions: Required. A list of extensions for the condition of the - delivery rule. - :type extensions: list[str] - """ - - _validation = { - 'odatatype': {'required': True, 'constant': True}, - 'extensions': {'required': True}, - } - - _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'extensions': {'key': 'extensions', 'type': '[str]'}, - } - - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" - - def __init__(self, **kwargs): - super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py deleted file mode 100644 index 450c880794ce..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UrlFileExtensionConditionParameters(Model): - """Defines the parameters for the URL file extension condition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" - . - :vartype odatatype: str - :param extensions: Required. A list of extensions for the condition of the - delivery rule. - :type extensions: list[str] - """ - - _validation = { - 'odatatype': {'required': True, 'constant': True}, - 'extensions': {'required': True}, - } - - _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'extensions': {'key': 'extensions', 'type': '[str]'}, - } - - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" - - def __init__(self, *, extensions, **kwargs) -> None: - super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters.py new file mode 100644 index 000000000000..0b62d3805e19 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlFileExtensionMatchConditionParameters(Model): + """Defines the parameters for UrlFileExtension match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + + def __init__(self, **kwargs): + super(UrlFileExtensionMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters_py3.py new file mode 100644 index 000000000000..331f0f503859 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlFileExtensionMatchConditionParameters(Model): + """Defines the parameters for UrlFileExtension match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(UrlFileExtensionMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters.py new file mode 100644 index 000000000000..587cad99f578 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlFileNameMatchConditionParameters(Model): + """Defines the parameters for UrlFilename match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" + + def __init__(self, **kwargs): + super(UrlFileNameMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters_py3.py new file mode 100644 index 000000000000..04f219fb7893 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlFileNameMatchConditionParameters(Model): + """Defines the parameters for UrlFilename match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(UrlFileNameMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py deleted file mode 100644 index 06b005be5c26..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UrlPathConditionParameters(Model): - """Defines the parameters for the URL path condition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . - :vartype odatatype: str - :param path: Required. A URL path for the condition of the delivery rule - :type path: str - :param match_type: Required. The match type for the condition of the - delivery rule. Possible values include: 'Literal', 'Wildcard' - :type match_type: str or ~azure.mgmt.cdn.models.enum - """ - - _validation = { - 'odatatype': {'required': True, 'constant': True}, - 'path': {'required': True}, - 'match_type': {'required': True}, - } - - _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'match_type': {'key': 'matchType', 'type': 'str'}, - } - - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" - - def __init__(self, **kwargs): - super(UrlPathConditionParameters, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.match_type = kwargs.get('match_type', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py deleted file mode 100644 index c1049a0260d9..000000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UrlPathConditionParameters(Model): - """Defines the parameters for the URL path condition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . - :vartype odatatype: str - :param path: Required. A URL path for the condition of the delivery rule - :type path: str - :param match_type: Required. The match type for the condition of the - delivery rule. Possible values include: 'Literal', 'Wildcard' - :type match_type: str or ~azure.mgmt.cdn.models.enum - """ - - _validation = { - 'odatatype': {'required': True, 'constant': True}, - 'path': {'required': True}, - 'match_type': {'required': True}, - } - - _attribute_map = { - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'match_type': {'key': 'matchType', 'type': 'str'}, - } - - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" - - def __init__(self, *, path: str, match_type, **kwargs) -> None: - super(UrlPathConditionParameters, self).__init__(**kwargs) - self.path = path - self.match_type = match_type diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters.py new file mode 100644 index 000000000000..2756286ffe45 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlPathMatchConditionParameters(Model): + """Defines the parameters for UrlPath match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + 'Wildcard' + :type operator: str or ~azure.mgmt.cdn.models.UrlPathOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + + def __init__(self, **kwargs): + super(UrlPathMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters_py3.py new file mode 100644 index 000000000000..bb77ba162fbc --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlPathMatchConditionParameters(Model): + """Defines the parameters for UrlPath match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + 'Wildcard' + :type operator: str or ~azure.mgmt.cdn.models.UrlPathOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(UrlPathMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action.py new file mode 100644 index 000000000000..5724f3c08771 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action import DeliveryRuleAction + + +class UrlRedirectAction(DeliveryRuleAction): + """Defines the url redirect action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRedirectActionParameters'}, + } + + def __init__(self, **kwargs): + super(UrlRedirectAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlRedirect' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters.py new file mode 100644 index 000000000000..b9157296cf5a --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlRedirectActionParameters(Model): + """Defines the parameters for the url redirect action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" . + :vartype odatatype: str + :param redirect_type: Required. The redirect type the rule will use when + redirecting traffic. Possible values include: 'Moved', 'Found', + 'TemporaryRedirect', 'PermanentRedirect' + :type redirect_type: str or ~azure.mgmt.cdn.models.RedirectType + :param destination_protocol: Protocol to use for the redirect. The default + value is MatchRequest. Possible values include: 'MatchRequest', 'Http', + 'Https' + :type destination_protocol: str or + ~azure.mgmt.cdn.models.DestinationProtocol + :param custom_path: The full path to redirect. Path cannot be empty and + must start with /. Leave empty to use the incoming path as destination + path. + :type custom_path: str + :param custom_hostname: Host to redirect. Leave empty to use the incoming + host as the destination host. + :type custom_hostname: str + :param custom_query_string: 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 + = format. ? and & will be added automatically so do not + include them. + :type custom_query_string: str + :param custom_fragment: Fragment to add to the redirect URL. Fragment is + the part of the URL that comes after #. Do not include the #. + :type custom_fragment: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'redirect_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'redirect_type': {'key': 'redirectType', 'type': 'str'}, + 'destination_protocol': {'key': 'destinationProtocol', 'type': 'str'}, + 'custom_path': {'key': 'customPath', 'type': 'str'}, + 'custom_hostname': {'key': 'customHostname', 'type': 'str'}, + 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, + 'custom_fragment': {'key': 'customFragment', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" + + def __init__(self, **kwargs): + super(UrlRedirectActionParameters, self).__init__(**kwargs) + self.redirect_type = kwargs.get('redirect_type', None) + self.destination_protocol = kwargs.get('destination_protocol', None) + self.custom_path = kwargs.get('custom_path', None) + self.custom_hostname = kwargs.get('custom_hostname', None) + self.custom_query_string = kwargs.get('custom_query_string', None) + self.custom_fragment = kwargs.get('custom_fragment', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters_py3.py new file mode 100644 index 000000000000..a69c266ef374 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters_py3.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlRedirectActionParameters(Model): + """Defines the parameters for the url redirect action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" . + :vartype odatatype: str + :param redirect_type: Required. The redirect type the rule will use when + redirecting traffic. Possible values include: 'Moved', 'Found', + 'TemporaryRedirect', 'PermanentRedirect' + :type redirect_type: str or ~azure.mgmt.cdn.models.RedirectType + :param destination_protocol: Protocol to use for the redirect. The default + value is MatchRequest. Possible values include: 'MatchRequest', 'Http', + 'Https' + :type destination_protocol: str or + ~azure.mgmt.cdn.models.DestinationProtocol + :param custom_path: The full path to redirect. Path cannot be empty and + must start with /. Leave empty to use the incoming path as destination + path. + :type custom_path: str + :param custom_hostname: Host to redirect. Leave empty to use the incoming + host as the destination host. + :type custom_hostname: str + :param custom_query_string: 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 + = format. ? and & will be added automatically so do not + include them. + :type custom_query_string: str + :param custom_fragment: Fragment to add to the redirect URL. Fragment is + the part of the URL that comes after #. Do not include the #. + :type custom_fragment: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'redirect_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'redirect_type': {'key': 'redirectType', 'type': 'str'}, + 'destination_protocol': {'key': 'destinationProtocol', 'type': 'str'}, + 'custom_path': {'key': 'customPath', 'type': 'str'}, + 'custom_hostname': {'key': 'customHostname', 'type': 'str'}, + 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, + 'custom_fragment': {'key': 'customFragment', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" + + def __init__(self, *, redirect_type, destination_protocol=None, custom_path: str=None, custom_hostname: str=None, custom_query_string: str=None, custom_fragment: str=None, **kwargs) -> None: + super(UrlRedirectActionParameters, self).__init__(**kwargs) + self.redirect_type = redirect_type + self.destination_protocol = destination_protocol + self.custom_path = custom_path + self.custom_hostname = custom_hostname + self.custom_query_string = custom_query_string + self.custom_fragment = custom_fragment diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_py3.py new file mode 100644 index 000000000000..05d16be2d6d9 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action_py3 import DeliveryRuleAction + + +class UrlRedirectAction(DeliveryRuleAction): + """Defines the url redirect action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRedirectActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(UrlRedirectAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlRedirect' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action.py new file mode 100644 index 000000000000..37e4aebb1c82 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action import DeliveryRuleAction + + +class UrlRewriteAction(DeliveryRuleAction): + """Defines the url rewrite action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRewriteActionParameters'}, + } + + def __init__(self, **kwargs): + super(UrlRewriteAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlRewrite' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters.py new file mode 100644 index 000000000000..b9f41b3203e6 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlRewriteActionParameters(Model): + """Defines the parameters for the url rewrite action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" . + :vartype odatatype: str + :param source_pattern: Required. define a request URI pattern that + identifies the type of requests that may be rewritten. Currently, source + pattern uses a prefix-based match. To match all URL paths, use "/" as the + source pattern value. To match only the root directory and re-write this + path, use the origin path field + :type source_pattern: str + :param destination: Required. Define the destination path for be used in + the rewrite. This will overwrite the source pattern + :type destination: str + :param preserve_unmatched_path: If True, the remaining path after the + source pattern will be appended to the new destination path. + :type preserve_unmatched_path: bool + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'source_pattern': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'source_pattern': {'key': 'sourcePattern', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + 'preserve_unmatched_path': {'key': 'preserveUnmatchedPath', 'type': 'bool'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" + + def __init__(self, **kwargs): + super(UrlRewriteActionParameters, self).__init__(**kwargs) + self.source_pattern = kwargs.get('source_pattern', None) + self.destination = kwargs.get('destination', None) + self.preserve_unmatched_path = kwargs.get('preserve_unmatched_path', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters_py3.py new file mode 100644 index 000000000000..c88ccdd354ba --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlRewriteActionParameters(Model): + """Defines the parameters for the url rewrite action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" . + :vartype odatatype: str + :param source_pattern: Required. define a request URI pattern that + identifies the type of requests that may be rewritten. Currently, source + pattern uses a prefix-based match. To match all URL paths, use "/" as the + source pattern value. To match only the root directory and re-write this + path, use the origin path field + :type source_pattern: str + :param destination: Required. Define the destination path for be used in + the rewrite. This will overwrite the source pattern + :type destination: str + :param preserve_unmatched_path: If True, the remaining path after the + source pattern will be appended to the new destination path. + :type preserve_unmatched_path: bool + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'source_pattern': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'source_pattern': {'key': 'sourcePattern', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + 'preserve_unmatched_path': {'key': 'preserveUnmatchedPath', 'type': 'bool'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" + + def __init__(self, *, source_pattern: str, destination: str, preserve_unmatched_path: bool=None, **kwargs) -> None: + super(UrlRewriteActionParameters, self).__init__(**kwargs) + self.source_pattern = source_pattern + self.destination = destination + self.preserve_unmatched_path = preserve_unmatched_path diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_py3.py new file mode 100644 index 000000000000..cb24ab055940 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------- + +from .delivery_rule_action_py3 import DeliveryRuleAction + + +class UrlRewriteAction(DeliveryRuleAction): + """Defines the url rewrite action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRewriteActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(UrlRewriteAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlRewrite' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py index 1153a4f390d3..80530b46ce38 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py @@ -22,6 +22,9 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,6 +41,7 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'KeyVaultCertificateSourceParameters'}, } diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py index 7a87fe51b92c..ee03188794d0 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py @@ -22,6 +22,9 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,11 +41,12 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'KeyVaultCertificateSourceParameters'}, } - def __init__(self, *, protocol_type, certificate_source_parameters, **kwargs) -> None: - super(UserManagedHttpsParameters, self).__init__(protocol_type=protocol_type, **kwargs) + def __init__(self, *, protocol_type, certificate_source_parameters, minimum_tls_version=None, **kwargs) -> None: + super(UserManagedHttpsParameters, self).__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs) self.certificate_source_parameters = certificate_source_parameters self.certificate_source = 'AzureKeyVault' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py index 554289209e1c..f24572ef6125 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py @@ -24,7 +24,7 @@ class CustomDomainsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-04-15". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-12" + self.api_version = "2019-04-15" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py index cc5d5a8bf537..0cd4485594d5 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py @@ -22,7 +22,7 @@ class EdgeNodesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-04-15". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-12" + self.api_version = "2019-04-15" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py index a0f80db8237c..73acbe5a525e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py @@ -24,7 +24,7 @@ class EndpointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-04-15". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-12" + self.api_version = "2019-04-15" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py index 6df470f3e38b..52b4c6870266 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-04-15". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-12" + self.api_version = "2019-04-15" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py index d523c944afb1..cfaa0fff394b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py @@ -24,7 +24,7 @@ class OriginsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-04-15". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-12" + self.api_version = "2019-04-15" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py index 7a90cfb55deb..4083cbd2d8e9 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py @@ -24,7 +24,7 @@ class ProfilesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-04-15". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-12" + self.api_version = "2019-04-15" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py index 12c58aea0d1f..db649c9ceedb 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py @@ -22,7 +22,7 @@ class ResourceUsageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-04-15". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-10-12" + self.api_version = "2019-04-15" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py index 9797f3dd0011..53c4c7ea05e8 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "2.0.0" diff --git a/sdk/cdn/azure-mgmt-cdn/setup.py b/sdk/cdn/azure-mgmt-cdn/setup.py index 2043f21c729b..c0e64112e92d 100644 --- a/sdk/cdn/azure-mgmt-cdn/setup.py +++ b/sdk/cdn/azure-mgmt-cdn/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',