How to use the msrest.service_client.ServiceClient function in msrest

To help you get started, we’ve selected a few msrest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-java / AutoRest / Generators / Python / Python.Tests / Expected / AcceptanceTests / CustomBaseUriMoreOptions / autorestparameterizedcustomhosttestclient / auto_rest_parameterized_custom_host_test_client.py View on Github external
def __init__(self, config):

        self._client = ServiceClient(None, config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer()
        self._deserialize = Deserializer(client_models)

        self.config = config
        self.paths = Paths(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / autorest / src / generator / AutoRest.Python.Azure.Tests / Expected / AcceptanceTests / Lro / fixtures / acceptancetestslro / auto_rest_long_running_operation_test_service.py View on Github external
def __init__(
            self, credentials, base_url=None):

        self.config = AutoRestLongRunningOperationTestServiceConfiguration(credentials, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '1.0.0'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.lr_os = LROsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.lro_retrys = LRORetrysOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.lrosa_ds = LROSADsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.lr_os_custom_header = LROsCustomHeaderOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / autorest / src / generator / AutoRest.Python.Tests / Expected / AcceptanceTests / BodyDateTimeRfc1123 / auto_rest_rfc1123_date_time_test_service / auto_rest_rfc1123_date_time_test_service.py View on Github external
def __init__(
            self, base_url=None):

        self.config = AutoRestRFC1123DateTimeTestServiceConfiguration(base_url)
        self._client = ServiceClient(None, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '1.0.0'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.datetimerfc1123 = Datetimerfc1123Operations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-java / AutoRest / Generators / Python / Python.Tests / Expected / AcceptanceTests / Url / autoresturltestservice / auto_rest_url_test_service.py View on Github external
def __init__(self, config):

        self._client = ServiceClient(None, config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer()
        self._deserialize = Deserializer(client_models)

        self.config = config
        self.paths = Paths(
            self._client, self.config, self._serialize, self._deserialize)
        self.queries = Queries(
            self._client, self.config, self._serialize, self._deserialize)
        self.path_items = PathItems(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-cli / src / command_modules / azure-cli-network / azure / cli / command_modules / network / mgmt_vnet_gateway / lib / vnet_gateway_creation_client.py View on Github external
def __init__(
            self, credentials, subscription_id, api_version='2015-11-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):

        self.config = VnetGatewayCreationClientConfiguration(credentials, subscription_id, api_version, accept_language, long_running_operation_retry_timeout, generate_client_request_id, base_url, filepath)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.vnet_gateway = VnetGatewayOperations(
            self._client, self.config, self._serialize, self._deserialize)
github ansible / ansible / lib / ansible / module_utils / azure_rm_common_rest.py View on Github external
def __init__(self, credentials, subscription_id, base_url=None):
        self.config = GenericRestClientConfiguration(credentials, subscription_id, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)
        self.models = None
github Azure / azure-sdk-for-python / azure-mgmt-compute / azure / mgmt / compute / compute / v2017_03_30 / compute_management_client.py View on Github external
def __init__(
            self, credentials, subscription_id, base_url=None):

        self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '2017-03-30'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.availability_sets = AvailabilitySetsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.virtual_machine_extensions = VirtualMachineExtensionsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.virtual_machine_images = VirtualMachineImagesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.usage = UsageOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-python / azure-mgmt-compute / azure / mgmt / compute / compute / v2016_03_30 / compute_management_client.py View on Github external
def __init__(
            self, credentials, subscription_id, base_url=None):

        self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '2016-03-30'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.availability_sets = AvailabilitySetsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.virtual_machine_extensions = VirtualMachineExtensionsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.virtual_machine_images = VirtualMachineImagesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.usage = UsageOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-cli / src / command_modules / azure-cli-network / azure / cli / command_modules / network / mgmt_express_route_circuit / lib / express_route_circuit_creation_client.py View on Github external
def __init__(
            self, credentials, subscription_id, api_version='2015-11-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):

        self.config = ExpressRouteCircuitCreationClientConfiguration(credentials, subscription_id, api_version, accept_language, long_running_operation_retry_timeout, generate_client_request_id, base_url, filepath)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.express_route_circuit = ExpressRouteCircuitOperations(
            self._client, self.config, self._serialize, self._deserialize)
github Azure / azure-sdk-for-java / AutoRest / Generators / Python / Python.Tests / Expected / AcceptanceTests / BodyByte / auto_rest_swagger_bat_byte_service / api_client.py View on Github external
def __init__(self, config):

        self._client = ServiceClient(None, config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer()
        self._deserialize = Deserializer(client_models)

        self.config = config
        self.byte = byte(
            self._client, self.config, self._serialize, self._deserialize)