From 83e7b9f23a56145429dedefe40607f121af16c9f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 2 Jul 2019 22:13:22 +0000 Subject: [PATCH] Generated from 8c4c188a1c86c8a466f7b37afce0f87d069b2926 API version is a client constant --- .../managedservices/operations/operations.py | 8 ++--- .../registration_assignments_operations.py | 32 +++++++------------ .../registration_definitions_operations.py | 29 +++++++---------- 3 files changed, 27 insertions(+), 42 deletions(-) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py index 85d385fc786..2cd9ebba8fd 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py @@ -22,6 +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: The API version to use for this operation. Constant value: "2019-06-01". """ models = models @@ -31,15 +32,14 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2019-06-01" self.config = config def list( - self, api_version, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Gets a list of the operations. - :param api_version: The API version to use for this operation. - :type api_version: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -56,7 +56,7 @@ def list( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py index e1295fca4bc..8c4a5d8ddcf 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py @@ -24,6 +24,7 @@ class RegistrationAssignmentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01". """ models = models @@ -33,11 +34,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2019-06-01" self.config = config def get( - self, scope, registration_assignment_id, api_version, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): + self, scope, registration_assignment_id, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): """Gets the details of specified registration assignment. :param scope: Scope of the resource. @@ -45,8 +47,6 @@ def get( :param registration_assignment_id: Guid of the registration assignment. :type registration_assignment_id: str - :param api_version: The API version to use for this operation. - :type api_version: str :param expand_registration_definition: Tells whether to return registration definition details also along with registration assignment details. @@ -74,7 +74,7 @@ def get( query_parameters = {} if expand_registration_definition is not None: query_parameters['$expandRegistrationDefinition'] = self._serialize.query("expand_registration_definition", expand_registration_definition, 'bool') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -107,7 +107,7 @@ def get( def _delete_initial( - self, scope, registration_assignment_id, api_version, custom_headers=None, raw=False, **operation_config): + self, scope, registration_assignment_id, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -118,7 +118,7 @@ def _delete_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -141,7 +141,7 @@ def _delete_initial( return client_raw_response def delete( - self, scope, registration_assignment_id, api_version, custom_headers=None, raw=False, polling=True, **operation_config): + self, scope, registration_assignment_id, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes the specified registration assignment. :param scope: Scope of the resource. @@ -149,8 +149,6 @@ def delete( :param registration_assignment_id: Guid of the registration assignment. :type registration_assignment_id: str - :param api_version: The API version to use for this operation. - :type api_version: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -166,7 +164,6 @@ def delete( raw_result = self._delete_initial( scope=scope, registration_assignment_id=registration_assignment_id, - api_version=api_version, custom_headers=custom_headers, raw=True, **operation_config @@ -188,7 +185,7 @@ def get_long_running_output(response): def _create_or_update_initial( - self, scope, registration_assignment_id, api_version, properties=None, custom_headers=None, raw=False, **operation_config): + self, scope, registration_assignment_id, properties=None, custom_headers=None, raw=False, **operation_config): request_body = models.RegistrationAssignment(properties=properties) # Construct URL @@ -201,7 +198,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -238,7 +235,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, scope, registration_assignment_id, api_version, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, scope, registration_assignment_id, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a registration assignment. :param scope: Scope of the resource. @@ -246,8 +243,6 @@ def create_or_update( :param registration_assignment_id: Guid of the registration assignment. :type registration_assignment_id: str - :param api_version: The API version to use for this operation. - :type api_version: str :param properties: Properties of a registration assignment. :type properties: ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties @@ -268,7 +263,6 @@ def create_or_update( raw_result = self._create_or_update_initial( scope=scope, registration_assignment_id=registration_assignment_id, - api_version=api_version, properties=properties, custom_headers=custom_headers, raw=True, @@ -294,13 +288,11 @@ def get_long_running_output(response): create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments/{registrationAssignmentId}'} def list( - self, scope, api_version, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): + self, scope, expand_registration_definition=None, custom_headers=None, raw=False, **operation_config): """Gets a list of the registration assignments. :param scope: Scope of the resource. :type scope: str - :param api_version: The API version to use for this operation. - :type api_version: str :param expand_registration_definition: Tells whether to return registration definition details also along with registration assignment details. @@ -330,7 +322,7 @@ def internal_paging(next_link=None, raw=False): query_parameters = {} if expand_registration_definition is not None: query_parameters['$expandRegistrationDefinition'] = self._serialize.query("expand_registration_definition", expand_registration_definition, 'bool') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py index 3a4c1204dde..f30ce8ce752 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py @@ -24,6 +24,7 @@ class RegistrationDefinitionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01". """ models = models @@ -33,11 +34,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2019-06-01" self.config = config def get( - self, scope, registration_definition_id, api_version, custom_headers=None, raw=False, **operation_config): + self, scope, registration_definition_id, custom_headers=None, raw=False, **operation_config): """Gets the registration definition details. :param scope: Scope of the resource. @@ -45,8 +47,6 @@ def get( :param registration_definition_id: Guid of the registration definition. :type registration_definition_id: str - :param api_version: The API version to use for this operation. - :type api_version: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -68,7 +68,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -100,14 +100,12 @@ def get( get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registrationDefinitionId}'} def delete( - self, registration_definition_id, api_version, scope, custom_headers=None, raw=False, **operation_config): + self, registration_definition_id, scope, custom_headers=None, raw=False, **operation_config): """Deletes the registration definition. :param registration_definition_id: Guid of the registration definition. :type registration_definition_id: str - :param api_version: The API version to use for this operation. - :type api_version: str :param scope: Scope of the resource. :type scope: str :param dict custom_headers: headers that will be added to the request @@ -130,7 +128,7 @@ def delete( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -155,7 +153,7 @@ def delete( def _create_or_update_initial( - self, registration_definition_id, api_version, scope, properties=None, plan=None, custom_headers=None, raw=False, **operation_config): + self, registration_definition_id, scope, properties=None, plan=None, custom_headers=None, raw=False, **operation_config): request_body = models.RegistrationDefinition(properties=properties, plan=plan) # Construct URL @@ -168,7 +166,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -205,14 +203,12 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, registration_definition_id, api_version, scope, properties=None, plan=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, registration_definition_id, scope, properties=None, plan=None, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a registration definition. :param registration_definition_id: Guid of the registration definition. :type registration_definition_id: str - :param api_version: The API version to use for this operation. - :type api_version: str :param scope: Scope of the resource. :type scope: str :param properties: Properties of a registration definition. @@ -236,7 +232,6 @@ def create_or_update( """ raw_result = self._create_or_update_initial( registration_definition_id=registration_definition_id, - api_version=api_version, scope=scope, properties=properties, plan=plan, @@ -264,13 +259,11 @@ def get_long_running_output(response): create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions/{registrationDefinitionId}'} def list( - self, scope, api_version, custom_headers=None, raw=False, **operation_config): + self, scope, custom_headers=None, raw=False, **operation_config): """Gets a list of the registration definitions. :param scope: Scope of the resource. :type scope: str - :param api_version: The API version to use for this operation. - :type api_version: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -294,7 +287,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link