Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-cdn] Create a new version of API 2020-03-31 #608

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,22 @@ class CdnManagementClient(CdnManagementClientOperationsMixin, SDKClient):
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param subscription_id1: Azure Subscription ID.
:type subscription_id1: str
:param api_version1: Version of the API to be used with the client
request. Current version is 2017-04-02.
:type api_version1: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, subscription_id1, api_version1, base_url=None):

self.config = CdnManagementClientConfiguration(credentials, subscription_id, base_url)
self.config = CdnManagementClientConfiguration(credentials, subscription_id, subscription_id1, api_version1, base_url)
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 = '2019-06-15-preview'
self.api_version = '2019-06-15'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
13 changes: 12 additions & 1 deletion sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,25 @@ class CdnManagementClientConfiguration(AzureConfiguration):
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param subscription_id1: Azure Subscription ID.
:type subscription_id1: str
:param api_version1: Version of the API to be used with the client
request. Current version is 2017-04-02.
:type api_version1: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, subscription_id1, api_version1, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if subscription_id1 is None:
raise ValueError("Parameter 'subscription_id1' must not be None.")
if api_version1 is None:
raise ValueError("Parameter 'api_version1' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

Expand All @@ -46,3 +55,5 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.subscription_id1 = subscription_id1
self.api_version1 = api_version1
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class CustomRuleEnabledState(str, Enum):
class MatchVariable(str, Enum):

remote_addr = "RemoteAddr"
country = "Country"
socket_addr = "SocketAddr"
request_method = "RequestMethod"
request_header = "RequestHeader"
request_uri = "RequestUri"
Expand Down
5 changes: 2 additions & 3 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2292,12 +2292,12 @@ class MatchCondition(Model):
All required parameters must be populated in order to send to Azure.

:param match_variable: Required. Match variable to compare against.
Possible values include: 'RemoteAddr', 'Country', 'RequestMethod',
Possible values include: 'RemoteAddr', 'SocketAddr', 'RequestMethod',
'RequestHeader', 'RequestUri', 'QueryString', 'RequestBody', 'Cookies',
'PostArgs'
:type match_variable: str or ~azure.mgmt.cdn.models.MatchVariable
:param selector: Selector can used to match a specific key for
QueryString, RequestUri, RequestHeaders or RequestBody.
QueryString, Cookies, RequestHeader or PostArgs.
:type selector: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains',
Expand Down Expand Up @@ -2523,7 +2523,6 @@ class PolicySettings(Model):
"""

_validation = {
'default_custom_block_response_status_code': {'maximum': 599, 'minimum': 200},
'default_custom_block_response_body': {'pattern': r'^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'},
}

Expand Down
5 changes: 2 additions & 3 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2292,12 +2292,12 @@ class MatchCondition(Model):
All required parameters must be populated in order to send to Azure.

:param match_variable: Required. Match variable to compare against.
Possible values include: 'RemoteAddr', 'Country', 'RequestMethod',
Possible values include: 'RemoteAddr', 'SocketAddr', 'RequestMethod',
'RequestHeader', 'RequestUri', 'QueryString', 'RequestBody', 'Cookies',
'PostArgs'
:type match_variable: str or ~azure.mgmt.cdn.models.MatchVariable
:param selector: Selector can used to match a specific key for
QueryString, RequestUri, RequestHeaders or RequestBody.
QueryString, Cookies, RequestHeader or PostArgs.
:type selector: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains',
Expand Down Expand Up @@ -2523,7 +2523,6 @@ class PolicySettings(Model):
"""

_validation = {
'default_custom_block_response_status_code': {'maximum': 599, 'minimum': 200},
'default_custom_block_response_body': {'pattern': r'^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ManagedRuleSetsOperations(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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PoliciesOperations(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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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: "2019-06-15-preview".
:ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-06-15".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-06-15-preview"
self.api_version = "2019-06-15"

self.config = config

Expand Down