当前位置: 首页>>代码示例>>Python>>正文


Python msrest.Serializer方法代码示例

本文整理汇总了Python中msrest.Serializer方法的典型用法代码示例。如果您正苦于以下问题:Python msrest.Serializer方法的具体用法?Python msrest.Serializer怎么用?Python msrest.Serializer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在msrest的用法示例。


在下文中一共展示了msrest.Serializer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(self, credentials, base_url=None):

        self.config = TokenApiClientConfiguration(credentials, base_url)
        super(TokenApiClient, 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 = "token"
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.bot_sign_in = BotSignInOperations(
            self._client, self.config, self._serialize, self._deserialize
        )
        self.user_token = UserTokenOperations(
            self._client, self.config, self._serialize, self._deserialize
        ) 
开发者ID:microsoft,项目名称:botbuilder-python,代码行数:20,代码来源:_token_api_client.py

示例2: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(self, credentials, base_url=None):

        self.config = TokenApiClientConfiguration(credentials, base_url)
        super(TokenApiClient, self).__init__(self.config)

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

        self.bot_sign_in = BotSignInOperations(
            self._client, self.config, self._serialize, self._deserialize
        )
        self.user_token = UserTokenOperations(
            self._client, self.config, self._serialize, self._deserialize
        ) 
开发者ID:microsoft,项目名称:botbuilder-python,代码行数:20,代码来源:_token_api_client_async.py

示例3: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(self, credentials, base_url=None):

        self.config = ConnectorClientConfiguration(credentials, base_url)
        super(ConnectorClient, self).__init__(self.config)

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

        self.attachments = AttachmentsOperations(
            self._client, self.config, self._serialize, self._deserialize
        )
        self.conversations = ConversationsOperations(
            self._client, self.config, self._serialize, self._deserialize
        ) 
开发者ID:microsoft,项目名称:botbuilder-python,代码行数:20,代码来源:_connector_client_async.py

示例4: blob_services

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def blob_services(self):
        """Instance depends on the API version:

           * 2018-07-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2018_07_01.operations.BlobServicesOperations>`
           * 2018-11-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2018_11_01.operations.BlobServicesOperations>`
           * 2019-04-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2019_04_01.operations.BlobServicesOperations>`
           * 2019-06-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2019_06_01.operations.BlobServicesOperations>`
        """
        api_version = self._get_api_version('blob_services')
        if api_version == '2018-07-01':
            from .v2018_07_01.operations import BlobServicesOperations as OperationClass
        elif api_version == '2018-11-01':
            from .v2018_11_01.operations import BlobServicesOperations as OperationClass
        elif api_version == '2019-04-01':
            from .v2019_04_01.operations import BlobServicesOperations as OperationClass
        elif api_version == '2019-06-01':
            from .v2019_06_01.operations import BlobServicesOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:22,代码来源:_storage_management_client.py

示例5: management_policies

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def management_policies(self):
        """Instance depends on the API version:

           * 2018-07-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2018_07_01.operations.ManagementPoliciesOperations>`
           * 2018-11-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2018_11_01.operations.ManagementPoliciesOperations>`
           * 2019-04-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2019_04_01.operations.ManagementPoliciesOperations>`
           * 2019-06-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2019_06_01.operations.ManagementPoliciesOperations>`
        """
        api_version = self._get_api_version('management_policies')
        if api_version == '2018-07-01':
            from .v2018_07_01.operations import ManagementPoliciesOperations as OperationClass
        elif api_version == '2018-11-01':
            from .v2018_11_01.operations import ManagementPoliciesOperations as OperationClass
        elif api_version == '2019-04-01':
            from .v2019_04_01.operations import ManagementPoliciesOperations as OperationClass
        elif api_version == '2019-06-01':
            from .v2019_06_01.operations import ManagementPoliciesOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:22,代码来源:_storage_management_client.py

示例6: usages

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def usages(self):
        """Instance depends on the API version:

           * 2018-03-01-preview: :class:`UsagesOperations<azure.mgmt.storage.v2018_03_01_preview.operations.UsagesOperations>`
           * 2018-07-01: :class:`UsagesOperations<azure.mgmt.storage.v2018_07_01.operations.UsagesOperations>`
           * 2018-11-01: :class:`UsagesOperations<azure.mgmt.storage.v2018_11_01.operations.UsagesOperations>`
           * 2019-04-01: :class:`UsagesOperations<azure.mgmt.storage.v2019_04_01.operations.UsagesOperations>`
           * 2019-06-01: :class:`UsagesOperations<azure.mgmt.storage.v2019_06_01.operations.UsagesOperations>`
        """
        api_version = self._get_api_version('usages')
        if api_version == '2018-03-01-preview':
            from .v2018_03_01_preview.operations import UsagesOperations as OperationClass
        elif api_version == '2018-07-01':
            from .v2018_07_01.operations import UsagesOperations as OperationClass
        elif api_version == '2018-11-01':
            from .v2018_11_01.operations import UsagesOperations as OperationClass
        elif api_version == '2019-04-01':
            from .v2019_04_01.operations import UsagesOperations as OperationClass
        elif api_version == '2019-06-01':
            from .v2019_06_01.operations import UsagesOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:25,代码来源:_storage_management_client.py

示例7: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(
            self, credentials, subscription_id, base_url=None):

        self.config = HybridComputeManagementClientConfiguration(credentials, subscription_id, base_url)
        super(HybridComputeManagementClient, 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-08-02-preview'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.machines = MachinesOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.machine_extensions = MachineExtensionsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.operations = Operations(
            self._client, self.config, self._serialize, self._deserialize) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:19,代码来源:_hybrid_compute_management_client.py

示例8: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(
        self,
        credential: "TokenCredential",
        subscription_id: str,
        acceptlanguage: Optional[str] = None,
        base_url: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = StorageImportExportConfiguration(credential, subscription_id, acceptlanguage, **kwargs)
        self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs)

        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.location = LocationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.job = JobOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.bit_locker_key = BitLockerKeyOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation = OperationOperations(
            self._client, self._config, self._serialize, self._deserialize) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:27,代码来源:_storage_import_export_async.py

示例9: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(
        self,
        credential: "AsyncTokenCredential",
        subscription_id: str,
        base_url: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = HealthcareApisManagementClientConfiguration(credential, subscription_id, **kwargs)
        self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

        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.service = ServiceOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation = OperationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation_result = OperationResultOperations(
            self._client, self._config, self._serialize, self._deserialize) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:24,代码来源:_healthcare_apis_management_client_async.py

示例10: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(
            self, credentials, subscription_id, provider_name, resource_type, resource_name, base_url=None):

        self.config = OperationsManagementClientConfiguration(credentials, subscription_id, provider_name, resource_type, resource_name, base_url)
        super(OperationsManagementClient, 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 = '2015-11-01-preview'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.solutions = SolutionsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.management_associations = ManagementAssociationsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.management_configurations = ManagementConfigurationsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.operations = Operations(
            self._client, self.config, self._serialize, self._deserialize) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:21,代码来源:_operations_management_client.py

示例11: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(
            self, credentials, base_url=None):

        self.config = SubscriptionClientConfiguration(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._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.operations = Operations(
            self._client, self.config, self._serialize, self._deserialize)
        self.subscription_operations = SubscriptionOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.subscription_factory = SubscriptionFactoryOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.subscriptions = SubscriptionsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.tenants = TenantsOperations(
            self._client, self.config, self._serialize, self._deserialize) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:22,代码来源:subscription_client.py

示例12: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(
        self,
        credential: "AsyncTokenCredential",
        subscription_id: str,
        base_url: Optional[str] = None,
        **kwargs: Any
    ) -> None:
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = AzureDedicatedHSMResourceProviderConfiguration(credential, subscription_id, **kwargs)
        self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

        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.dedicated_hsm = DedicatedHsmOperations(
            self._client, self._config, self._serialize, self._deserialize) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:20,代码来源:_azure_dedicated_hsm_resource_provider_async.py

示例13: __init__

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def __init__(
        self,
        credential,  # type: "TokenCredential"
        subscription_id,  # type: str
        base_url=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = AzureDedicatedHSMResourceProviderConfiguration(credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

        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.dedicated_hsm = DedicatedHsmOperations(
            self._client, self._config, self._serialize, self._deserialize) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:21,代码来源:_azure_dedicated_hsm_resource_provider.py

示例14: ddos_protection_plans

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def ddos_protection_plans(self):
        """Instance depends on the API version:

           * 2018-02-01: :class:`DdosProtectionPlansOperations<azure.mgmt.network.v2018_02_01.operations.DdosProtectionPlansOperations>`
           * 2018-04-01: :class:`DdosProtectionPlansOperations<azure.mgmt.network.v2018_04_01.operations.DdosProtectionPlansOperations>`
           * 2018-06-01: :class:`DdosProtectionPlansOperations<azure.mgmt.network.v2018_06_01.operations.DdosProtectionPlansOperations>`
           * 2018-07-01: :class:`DdosProtectionPlansOperations<azure.mgmt.network.v2018_07_01.operations.DdosProtectionPlansOperations>`
           * 2018-08-01: :class:`DdosProtectionPlansOperations<azure.mgmt.network.v2018_08_01.operations.DdosProtectionPlansOperations>`
        """
        api_version = self._get_api_version('ddos_protection_plans')
        if api_version == '2018-02-01':
            from .v2018_02_01.operations import DdosProtectionPlansOperations as OperationClass
        elif api_version == '2018-04-01':
            from .v2018_04_01.operations import DdosProtectionPlansOperations as OperationClass
        elif api_version == '2018-06-01':
            from .v2018_06_01.operations import DdosProtectionPlansOperations as OperationClass
        elif api_version == '2018-07-01':
            from .v2018_07_01.operations import DdosProtectionPlansOperations as OperationClass
        elif api_version == '2018-08-01':
            from .v2018_08_01.operations import DdosProtectionPlansOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:25,代码来源:network_management_client.py

示例15: express_route_cross_connection_peerings

# 需要导入模块: import msrest [as 别名]
# 或者: from msrest import Serializer [as 别名]
def express_route_cross_connection_peerings(self):
        """Instance depends on the API version:

           * 2018-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_02_01.operations.ExpressRouteCrossConnectionPeeringsOperations>`
           * 2018-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_04_01.operations.ExpressRouteCrossConnectionPeeringsOperations>`
           * 2018-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_06_01.operations.ExpressRouteCrossConnectionPeeringsOperations>`
           * 2018-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_07_01.operations.ExpressRouteCrossConnectionPeeringsOperations>`
           * 2018-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations<azure.mgmt.network.v2018_08_01.operations.ExpressRouteCrossConnectionPeeringsOperations>`
        """
        api_version = self._get_api_version('express_route_cross_connection_peerings')
        if api_version == '2018-02-01':
            from .v2018_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass
        elif api_version == '2018-04-01':
            from .v2018_04_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass
        elif api_version == '2018-06-01':
            from .v2018_06_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass
        elif api_version == '2018-07-01':
            from .v2018_07_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass
        elif api_version == '2018-08-01':
            from .v2018_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass
        else:
            raise NotImplementedError("APIVersion {} is not available".format(api_version))
        return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) 
开发者ID:Azure,项目名称:azure-cli-extensions,代码行数:25,代码来源:network_management_client.py


注:本文中的msrest.Serializer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。