<s> from msrest . pipeline import ClientRawResponse <EOL> from msrestazure . azure_exceptions import CloudError <EOL> import uuid <EOL> from . . import models <EOL> class ClassicMobileServicesOperations ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , client , config , serializer , deserializer ) : <EOL> self . _client = client <EOL> self . _serialize = serializer <EOL> self . _deserialize = deserializer <EOL> self . config = config <EOL> def get_classic_mobile_services ( <EOL> self , resource_group_name , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , resource_group_name , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , self . config . subscription_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> request = self . _client . get ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> exp = CloudError ( response ) <EOL> exp . request_id = response . headers . get ( '<STR_LIT>' ) <EOL> raise exp <EOL> deserialized = None <EOL> if response . status_code == <NUM_LIT:200> : <EOL> deserialized = self . _deserialize ( '<STR_LIT>' , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( deserialized , response ) <EOL> return client_raw_response <EOL> return deserialized <EOL> def get_classic_mobile_service ( <EOL> self , resource_group_name , name , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , resource_group_name , '<STR_LIT:str>' ) , <EOL> '<STR_LIT:name>' : self . _serialize . url ( "<STR_LIT:name>" , name , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , self . config . subscription_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> request = self . _client . get ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> exp = CloudError ( response ) <EOL> exp . request_id = response . headers . get ( '<STR_LIT>' ) <EOL> raise exp <EOL> deserialized = None <EOL> if response . status_code == <NUM_LIT:200> : <EOL> deserialized = self . _deserialize ( '<STR_LIT>' , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( deserialized , response ) <EOL> return client_raw_response <EOL> return deserialized <EOL> def delete_classic_mobile_service ( <EOL> self , resource_group_name , name , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , resource_group_name , '<STR_LIT:str>' ) , <EOL> '<STR_LIT:name>' : self . _serialize . url ( "<STR_LIT:name>" , name , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , self . config . subscription_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> request = self . _client . delete ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> exp = CloudError ( response ) <EOL> exp . request_id = response . headers . get ( '<STR_LIT>' ) <EOL> raise exp <EOL> deserialized = None <EOL> if response . status_code == <NUM_LIT:200> : <EOL> deserialized = self . _deserialize ( '<STR_LIT:object>' , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( deserialized , response ) <EOL> return client_raw_response <EOL> return deserialized </s>
