diff --git a/sdk/automation/azure-mgmt-automation/azure-mgmt-automation-0.1.1.zip b/sdk/automation/azure-mgmt-automation/azure-mgmt-automation-0.1.1.zip new file mode 100644 index 000000000000..d3c052b3bb7b Binary files /dev/null and b/sdk/automation/azure-mgmt-automation/azure-mgmt-automation-0.1.1.zip differ diff --git a/sdk/automation/azure-mgmt-automation/azure_mgmt_automation-0.1.1-py2.py3-none-any.whl b/sdk/automation/azure-mgmt-automation/azure_mgmt_automation-0.1.1-py2.py3-none-any.whl new file mode 100644 index 000000000000..4d870b024f37 Binary files /dev/null and b/sdk/automation/azure-mgmt-automation/azure_mgmt_automation-0.1.1-py2.py3-none-any.whl differ diff --git a/sdk/cdn/azure-mgmt-cdn/azure-mgmt-cdn-3.1.0.zip b/sdk/cdn/azure-mgmt-cdn/azure-mgmt-cdn-3.1.0.zip new file mode 100644 index 000000000000..c432bceae62d Binary files /dev/null and b/sdk/cdn/azure-mgmt-cdn/azure-mgmt-cdn-3.1.0.zip differ diff --git a/sdk/cdn/azure-mgmt-cdn/azure_mgmt_cdn-3.1.0-py2.py3-none-any.whl b/sdk/cdn/azure-mgmt-cdn/azure_mgmt_cdn-3.1.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..21a9c8fe37a3 Binary files /dev/null and b/sdk/cdn/azure-mgmt-cdn/azure_mgmt_cdn-3.1.0-py2.py3-none-any.whl differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure-cognitiveservices-formrecognizer-0.1.0.zip b/sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure-cognitiveservices-formrecognizer-0.1.0.zip new file mode 100644 index 000000000000..6ef5acfb70c6 Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure-cognitiveservices-formrecognizer-0.1.0.zip differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure_cognitiveservices_formrecognizer-0.1.0-py2.py3-none-any.whl b/sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure_cognitiveservices_formrecognizer-0.1.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..587322136a3c Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-formrecognizer/azure_cognitiveservices_formrecognizer-0.1.0-py2.py3-none-any.whl differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure-cognitiveservices-knowledge-qnamaker-0.1.0.zip b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure-cognitiveservices-knowledge-qnamaker-0.1.0.zip new file mode 100644 index 000000000000..9edbad41fc9d Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure-cognitiveservices-knowledge-qnamaker-0.1.0.zip differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure_cognitiveservices_knowledge_qnamaker-0.1.0-py2.py3-none-any.whl b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure_cognitiveservices_knowledge_qnamaker-0.1.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..ef806a982c2f Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure_cognitiveservices_knowledge_qnamaker-0.1.0-py2.py3-none-any.whl differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure-cognitiveservices-language-luis-0.4.0.zip b/sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure-cognitiveservices-language-luis-0.4.0.zip new file mode 100644 index 000000000000..e4335c0dc988 Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure-cognitiveservices-language-luis-0.4.0.zip differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure_cognitiveservices_language_luis-0.4.0-py2.py3-none-any.whl b/sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure_cognitiveservices_language_luis-0.4.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..05d6c26ebe85 Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure_cognitiveservices_language_luis-0.4.0-py2.py3-none-any.whl differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-personalizer/azure-cognitiveservices-personalizer-0.1.0.zip b/sdk/cognitiveservices/azure-cognitiveservices-personalizer/azure-cognitiveservices-personalizer-0.1.0.zip new file mode 100644 index 000000000000..616bec437756 Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-personalizer/azure-cognitiveservices-personalizer-0.1.0.zip differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-personalizer/azure_cognitiveservices_personalizer-0.1.0-py2.py3-none-any.whl b/sdk/cognitiveservices/azure-cognitiveservices-personalizer/azure_cognitiveservices_personalizer-0.1.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..c36d3388c135 Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-personalizer/azure_cognitiveservices_personalizer-0.1.0-py2.py3-none-any.whl differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/azure-cognitiveservices-search-autosuggest-0.1.0.zip b/sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/azure-cognitiveservices-search-autosuggest-0.1.0.zip new file mode 100644 index 000000000000..5c19838babe2 Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/azure-cognitiveservices-search-autosuggest-0.1.0.zip differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/azure_cognitiveservices_search_autosuggest-0.1.0-py2.py3-none-any.whl b/sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/azure_cognitiveservices_search_autosuggest-0.1.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..3f2d4d5303fd Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/azure_cognitiveservices_search_autosuggest-0.1.0-py2.py3-none-any.whl differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure-cognitiveservices-search-visualsearch-0.2.0.zip b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure-cognitiveservices-search-visualsearch-0.2.0.zip new file mode 100644 index 000000000000..986121c8701e Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure-cognitiveservices-search-visualsearch-0.2.0.zip differ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure_cognitiveservices_search_visualsearch-0.2.0-py2.py3-none-any.whl b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure_cognitiveservices_search_visualsearch-0.2.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..4c4498d50300 Binary files /dev/null and b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure_cognitiveservices_search_visualsearch-0.2.0-py2.py3-none-any.whl differ diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure-mgmt-cognitiveservices-5.0.0.zip b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure-mgmt-cognitiveservices-5.0.0.zip new file mode 100644 index 000000000000..8bfd1014ad76 Binary files /dev/null and b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure-mgmt-cognitiveservices-5.0.0.zip differ diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure_mgmt_cognitiveservices-5.0.0-py2.py3-none-any.whl b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure_mgmt_cognitiveservices-5.0.0-py2.py3-none-any.whl new file mode 100644 index 000000000000..e4989a33c2f6 Binary files /dev/null and b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure_mgmt_cognitiveservices-5.0.0-py2.py3-none-any.whl differ diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py index ca77cf2626bc..f101f605823d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py @@ -132,38 +132,38 @@ def models(cls, api_version=DEFAULT_API_VERSION): def availability_sets(self): """Instance depends on the API version: - * 2015-06-15: :class:`AvailabilitySetsOperations` - * 2016-03-30: :class:`AvailabilitySetsOperations` + * 2019-07-01: :class:`AvailabilitySetsOperations` + * 2018-06-01: :class:`AvailabilitySetsOperations` + * 2019-03-01: :class:`AvailabilitySetsOperations` + * 2017-12-01: :class:`AvailabilitySetsOperations` * 2016-04-30-preview: :class:`AvailabilitySetsOperations` + * 2016-03-30: :class:`AvailabilitySetsOperations` + * 2015-06-15: :class:`AvailabilitySetsOperations` + * 2018-10-01: :class:`AvailabilitySetsOperations` * 2017-03-30: :class:`AvailabilitySetsOperations` - * 2017-12-01: :class:`AvailabilitySetsOperations` * 2018-04-01: :class:`AvailabilitySetsOperations` - * 2018-06-01: :class:`AvailabilitySetsOperations` - * 2018-10-01: :class:`AvailabilitySetsOperations` - * 2019-03-01: :class:`AvailabilitySetsOperations` - * 2019-07-01: :class:`AvailabilitySetsOperations` """ api_version = self._get_api_version('availability_sets') - if api_version == '2015-06-15': - from .v2015_06_15.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import AvailabilitySetsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import AvailabilitySetsOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import AvailabilitySetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailabilitySetsOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import AvailabilitySetsOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import AvailabilitySetsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import AvailabilitySetsOperations 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))) @@ -172,14 +172,14 @@ def availability_sets(self): def dedicated_host_groups(self): """Instance depends on the API version: - * 2019-03-01: :class:`DedicatedHostGroupsOperations` * 2019-07-01: :class:`DedicatedHostGroupsOperations` + * 2019-03-01: :class:`DedicatedHostGroupsOperations` """ api_version = self._get_api_version('dedicated_host_groups') - if api_version == '2019-03-01': - from .v2019_03_01.operations import DedicatedHostGroupsOperations as OperationClass - elif api_version == '2019-07-01': + if api_version == '2019-07-01': from .v2019_07_01.operations import DedicatedHostGroupsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import DedicatedHostGroupsOperations 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))) @@ -188,14 +188,14 @@ def dedicated_host_groups(self): def dedicated_hosts(self): """Instance depends on the API version: - * 2019-03-01: :class:`DedicatedHostsOperations` * 2019-07-01: :class:`DedicatedHostsOperations` + * 2019-03-01: :class:`DedicatedHostsOperations` """ api_version = self._get_api_version('dedicated_hosts') - if api_version == '2019-03-01': - from .v2019_03_01.operations import DedicatedHostsOperations as OperationClass - elif api_version == '2019-07-01': + if api_version == '2019-07-01': from .v2019_07_01.operations import DedicatedHostsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import DedicatedHostsOperations 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))) @@ -217,29 +217,29 @@ def disk_encryption_sets(self): def disks(self): """Instance depends on the API version: - * 2016-04-30-preview: :class:`DisksOperations` - * 2017-03-30: :class:`DisksOperations` - * 2018-04-01: :class:`DisksOperations` + * 2019-07-01: :class:`DisksOperations` * 2018-06-01: :class:`DisksOperations` * 2018-09-30: :class:`DisksOperations` * 2019-03-01: :class:`DisksOperations` - * 2019-07-01: :class:`DisksOperations` + * 2016-04-30-preview: :class:`DisksOperations` + * 2017-03-30: :class:`DisksOperations` + * 2018-04-01: :class:`DisksOperations` """ api_version = self._get_api_version('disks') - if api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import DisksOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import DisksOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import DisksOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import DisksOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import DisksOperations as OperationClass elif api_version == '2018-09-30': from .v2018_09_30.operations import DisksOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import DisksOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import DisksOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import DisksOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import DisksOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import DisksOperations 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))) @@ -248,17 +248,17 @@ def disks(self): def galleries(self): """Instance depends on the API version: + * 2019-07-01: :class:`GalleriesOperations` * 2018-06-01: :class:`GalleriesOperations` * 2019-03-01: :class:`GalleriesOperations` - * 2019-07-01: :class:`GalleriesOperations` """ api_version = self._get_api_version('galleries') - if api_version == '2018-06-01': + if api_version == '2019-07-01': + from .v2019_07_01.operations import GalleriesOperations as OperationClass + elif api_version == '2018-06-01': from .v2018_06_01.operations import GalleriesOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import GalleriesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import GalleriesOperations 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))) @@ -267,14 +267,14 @@ def galleries(self): def gallery_application_versions(self): """Instance depends on the API version: - * 2019-03-01: :class:`GalleryApplicationVersionsOperations` * 2019-07-01: :class:`GalleryApplicationVersionsOperations` + * 2019-03-01: :class:`GalleryApplicationVersionsOperations` """ api_version = self._get_api_version('gallery_application_versions') - if api_version == '2019-03-01': - from .v2019_03_01.operations import GalleryApplicationVersionsOperations as OperationClass - elif api_version == '2019-07-01': + if api_version == '2019-07-01': from .v2019_07_01.operations import GalleryApplicationVersionsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import GalleryApplicationVersionsOperations 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))) @@ -283,14 +283,14 @@ def gallery_application_versions(self): def gallery_applications(self): """Instance depends on the API version: - * 2019-03-01: :class:`GalleryApplicationsOperations` * 2019-07-01: :class:`GalleryApplicationsOperations` + * 2019-03-01: :class:`GalleryApplicationsOperations` """ api_version = self._get_api_version('gallery_applications') - if api_version == '2019-03-01': - from .v2019_03_01.operations import GalleryApplicationsOperations as OperationClass - elif api_version == '2019-07-01': + if api_version == '2019-07-01': from .v2019_07_01.operations import GalleryApplicationsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import GalleryApplicationsOperations 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))) @@ -299,17 +299,17 @@ def gallery_applications(self): def gallery_image_versions(self): """Instance depends on the API version: + * 2019-07-01: :class:`GalleryImageVersionsOperations` * 2018-06-01: :class:`GalleryImageVersionsOperations` * 2019-03-01: :class:`GalleryImageVersionsOperations` - * 2019-07-01: :class:`GalleryImageVersionsOperations` """ api_version = self._get_api_version('gallery_image_versions') - if api_version == '2018-06-01': + if api_version == '2019-07-01': + from .v2019_07_01.operations import GalleryImageVersionsOperations as OperationClass + elif api_version == '2018-06-01': from .v2018_06_01.operations import GalleryImageVersionsOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import GalleryImageVersionsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import GalleryImageVersionsOperations 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))) @@ -318,17 +318,17 @@ def gallery_image_versions(self): def gallery_images(self): """Instance depends on the API version: + * 2019-07-01: :class:`GalleryImagesOperations` * 2018-06-01: :class:`GalleryImagesOperations` * 2019-03-01: :class:`GalleryImagesOperations` - * 2019-07-01: :class:`GalleryImagesOperations` """ api_version = self._get_api_version('gallery_images') - if api_version == '2018-06-01': + if api_version == '2019-07-01': + from .v2019_07_01.operations import GalleryImagesOperations as OperationClass + elif api_version == '2018-06-01': from .v2018_06_01.operations import GalleryImagesOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import GalleryImagesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import GalleryImagesOperations 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))) @@ -337,32 +337,32 @@ def gallery_images(self): def images(self): """Instance depends on the API version: + * 2019-07-01: :class:`ImagesOperations` + * 2018-06-01: :class:`ImagesOperations` + * 2019-03-01: :class:`ImagesOperations` + * 2017-12-01: :class:`ImagesOperations` * 2016-04-30-preview: :class:`ImagesOperations` + * 2018-10-01: :class:`ImagesOperations` * 2017-03-30: :class:`ImagesOperations` - * 2017-12-01: :class:`ImagesOperations` * 2018-04-01: :class:`ImagesOperations` - * 2018-06-01: :class:`ImagesOperations` - * 2018-10-01: :class:`ImagesOperations` - * 2019-03-01: :class:`ImagesOperations` - * 2019-07-01: :class:`ImagesOperations` """ api_version = self._get_api_version('images') - if api_version == '2016-04-30-preview': + if api_version == '2019-07-01': + from .v2019_07_01.operations import ImagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ImagesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import ImagesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import ImagesOperations as OperationClass + elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import ImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ImagesOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import ImagesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import ImagesOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import ImagesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import ImagesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import ImagesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import ImagesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import ImagesOperations 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))) @@ -371,26 +371,26 @@ def images(self): def log_analytics(self): """Instance depends on the API version: - * 2017-12-01: :class:`LogAnalyticsOperations` - * 2018-04-01: :class:`LogAnalyticsOperations` + * 2019-07-01: :class:`LogAnalyticsOperations` * 2018-06-01: :class:`LogAnalyticsOperations` - * 2018-10-01: :class:`LogAnalyticsOperations` * 2019-03-01: :class:`LogAnalyticsOperations` - * 2019-07-01: :class:`LogAnalyticsOperations` + * 2017-12-01: :class:`LogAnalyticsOperations` + * 2018-10-01: :class:`LogAnalyticsOperations` + * 2018-04-01: :class:`LogAnalyticsOperations` """ api_version = self._get_api_version('log_analytics') - if api_version == '2017-12-01': - from .v2017_12_01.operations import LogAnalyticsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import LogAnalyticsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import LogAnalyticsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import LogAnalyticsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import LogAnalyticsOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import LogAnalyticsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LogAnalyticsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LogAnalyticsOperations 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))) @@ -399,26 +399,26 @@ def log_analytics(self): def operations(self): """Instance depends on the API version: - * 2017-12-01: :class:`Operations` - * 2018-04-01: :class:`Operations` + * 2019-07-01: :class:`Operations` * 2018-06-01: :class:`Operations` - * 2018-10-01: :class:`Operations` * 2019-03-01: :class:`Operations` - * 2019-07-01: :class:`Operations` + * 2017-12-01: :class:`Operations` + * 2018-10-01: :class:`Operations` + * 2018-04-01: :class:`Operations` """ api_version = self._get_api_version('operations') - if api_version == '2017-12-01': - from .v2017_12_01.operations import Operations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import Operations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import Operations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import Operations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import Operations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import Operations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import Operations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import Operations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import Operations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import Operations 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))) @@ -427,23 +427,23 @@ def operations(self): def proximity_placement_groups(self): """Instance depends on the API version: - * 2018-04-01: :class:`ProximityPlacementGroupsOperations` + * 2019-07-01: :class:`ProximityPlacementGroupsOperations` * 2018-06-01: :class:`ProximityPlacementGroupsOperations` - * 2018-10-01: :class:`ProximityPlacementGroupsOperations` * 2019-03-01: :class:`ProximityPlacementGroupsOperations` - * 2019-07-01: :class:`ProximityPlacementGroupsOperations` + * 2018-10-01: :class:`ProximityPlacementGroupsOperations` + * 2018-04-01: :class:`ProximityPlacementGroupsOperations` """ api_version = self._get_api_version('proximity_placement_groups') - if api_version == '2018-04-01': - from .v2018_04_01.operations import ProximityPlacementGroupsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import ProximityPlacementGroupsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import ProximityPlacementGroupsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import ProximityPlacementGroupsOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import ProximityPlacementGroupsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import ProximityPlacementGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ProximityPlacementGroupsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ProximityPlacementGroupsOperations 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))) @@ -452,17 +452,17 @@ def proximity_placement_groups(self): def resource_skus(self): """Instance depends on the API version: - * 2017-03-30: :class:`ResourceSkusOperations` - * 2017-09-01: :class:`ResourceSkusOperations` * 2019-04-01: :class:`ResourceSkusOperations` + * 2017-09-01: :class:`ResourceSkusOperations` + * 2017-03-30: :class:`ResourceSkusOperations` """ api_version = self._get_api_version('resource_skus') - if api_version == '2017-03-30': - from .v2017_03_30.operations import ResourceSkusOperations as OperationClass + if api_version == '2019-04-01': + from .v2019_04_01.operations import ResourceSkusOperations as OperationClass elif api_version == '2017-09-01': from .v2017_09_01.operations import ResourceSkusOperations as OperationClass - elif api_version == '2019-04-01': - from .v2019_04_01.operations import ResourceSkusOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import ResourceSkusOperations 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))) @@ -471,29 +471,29 @@ def resource_skus(self): def snapshots(self): """Instance depends on the API version: - * 2016-04-30-preview: :class:`SnapshotsOperations` - * 2017-03-30: :class:`SnapshotsOperations` - * 2018-04-01: :class:`SnapshotsOperations` + * 2019-07-01: :class:`SnapshotsOperations` * 2018-06-01: :class:`SnapshotsOperations` * 2018-09-30: :class:`SnapshotsOperations` * 2019-03-01: :class:`SnapshotsOperations` - * 2019-07-01: :class:`SnapshotsOperations` + * 2016-04-30-preview: :class:`SnapshotsOperations` + * 2017-03-30: :class:`SnapshotsOperations` + * 2018-04-01: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') - if api_version == '2016-04-30-preview': - from .v2016_04_30_preview.operations import SnapshotsOperations as OperationClass - elif api_version == '2017-03-30': - from .v2017_03_30.operations import SnapshotsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import SnapshotsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import SnapshotsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import SnapshotsOperations as OperationClass elif api_version == '2018-09-30': from .v2018_09_30.operations import SnapshotsOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import SnapshotsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import SnapshotsOperations as OperationClass + elif api_version == '2016-04-30-preview': + from .v2016_04_30_preview.operations import SnapshotsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import SnapshotsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import SnapshotsOperations 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))) @@ -502,38 +502,38 @@ def snapshots(self): def usage(self): """Instance depends on the API version: - * 2015-06-15: :class:`UsageOperations` - * 2016-03-30: :class:`UsageOperations` + * 2019-07-01: :class:`UsageOperations` + * 2018-06-01: :class:`UsageOperations` + * 2019-03-01: :class:`UsageOperations` + * 2017-12-01: :class:`UsageOperations` * 2016-04-30-preview: :class:`UsageOperations` + * 2016-03-30: :class:`UsageOperations` + * 2015-06-15: :class:`UsageOperations` + * 2018-10-01: :class:`UsageOperations` * 2017-03-30: :class:`UsageOperations` - * 2017-12-01: :class:`UsageOperations` * 2018-04-01: :class:`UsageOperations` - * 2018-06-01: :class:`UsageOperations` - * 2018-10-01: :class:`UsageOperations` - * 2019-03-01: :class:`UsageOperations` - * 2019-07-01: :class:`UsageOperations` """ api_version = self._get_api_version('usage') - if api_version == '2015-06-15': - from .v2015_06_15.operations import UsageOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import UsageOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import UsageOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import UsageOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import UsageOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import UsageOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import UsageOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import UsageOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import UsageOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import UsageOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import UsageOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import UsageOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import UsageOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import UsageOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import UsageOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import UsageOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import UsageOperations 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))) @@ -542,38 +542,38 @@ def usage(self): def virtual_machine_extension_images(self): """Instance depends on the API version: - * 2015-06-15: :class:`VirtualMachineExtensionImagesOperations` - * 2016-03-30: :class:`VirtualMachineExtensionImagesOperations` + * 2019-07-01: :class:`VirtualMachineExtensionImagesOperations` + * 2018-06-01: :class:`VirtualMachineExtensionImagesOperations` + * 2019-03-01: :class:`VirtualMachineExtensionImagesOperations` + * 2017-12-01: :class:`VirtualMachineExtensionImagesOperations` * 2016-04-30-preview: :class:`VirtualMachineExtensionImagesOperations` + * 2016-03-30: :class:`VirtualMachineExtensionImagesOperations` + * 2015-06-15: :class:`VirtualMachineExtensionImagesOperations` + * 2018-10-01: :class:`VirtualMachineExtensionImagesOperations` * 2017-03-30: :class:`VirtualMachineExtensionImagesOperations` - * 2017-12-01: :class:`VirtualMachineExtensionImagesOperations` * 2018-04-01: :class:`VirtualMachineExtensionImagesOperations` - * 2018-06-01: :class:`VirtualMachineExtensionImagesOperations` - * 2018-10-01: :class:`VirtualMachineExtensionImagesOperations` - * 2019-03-01: :class:`VirtualMachineExtensionImagesOperations` - * 2019-07-01: :class:`VirtualMachineExtensionImagesOperations` """ api_version = self._get_api_version('virtual_machine_extension_images') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineExtensionImagesOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineExtensionImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineExtensionImagesOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineExtensionImagesOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineExtensionImagesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineExtensionImagesOperations 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))) @@ -582,38 +582,38 @@ def virtual_machine_extension_images(self): def virtual_machine_extensions(self): """Instance depends on the API version: - * 2015-06-15: :class:`VirtualMachineExtensionsOperations` - * 2016-03-30: :class:`VirtualMachineExtensionsOperations` + * 2019-07-01: :class:`VirtualMachineExtensionsOperations` + * 2018-06-01: :class:`VirtualMachineExtensionsOperations` + * 2019-03-01: :class:`VirtualMachineExtensionsOperations` + * 2017-12-01: :class:`VirtualMachineExtensionsOperations` * 2016-04-30-preview: :class:`VirtualMachineExtensionsOperations` + * 2016-03-30: :class:`VirtualMachineExtensionsOperations` + * 2015-06-15: :class:`VirtualMachineExtensionsOperations` + * 2018-10-01: :class:`VirtualMachineExtensionsOperations` * 2017-03-30: :class:`VirtualMachineExtensionsOperations` - * 2017-12-01: :class:`VirtualMachineExtensionsOperations` * 2018-04-01: :class:`VirtualMachineExtensionsOperations` - * 2018-06-01: :class:`VirtualMachineExtensionsOperations` - * 2018-10-01: :class:`VirtualMachineExtensionsOperations` - * 2019-03-01: :class:`VirtualMachineExtensionsOperations` - * 2019-07-01: :class:`VirtualMachineExtensionsOperations` """ api_version = self._get_api_version('virtual_machine_extensions') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineExtensionsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineExtensionsOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineExtensionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineExtensionsOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineExtensionsOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineExtensionsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineExtensionsOperations 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))) @@ -622,38 +622,38 @@ def virtual_machine_extensions(self): def virtual_machine_images(self): """Instance depends on the API version: - * 2015-06-15: :class:`VirtualMachineImagesOperations` - * 2016-03-30: :class:`VirtualMachineImagesOperations` + * 2019-07-01: :class:`VirtualMachineImagesOperations` + * 2018-06-01: :class:`VirtualMachineImagesOperations` + * 2019-03-01: :class:`VirtualMachineImagesOperations` + * 2017-12-01: :class:`VirtualMachineImagesOperations` * 2016-04-30-preview: :class:`VirtualMachineImagesOperations` + * 2016-03-30: :class:`VirtualMachineImagesOperations` + * 2015-06-15: :class:`VirtualMachineImagesOperations` + * 2018-10-01: :class:`VirtualMachineImagesOperations` * 2017-03-30: :class:`VirtualMachineImagesOperations` - * 2017-12-01: :class:`VirtualMachineImagesOperations` * 2018-04-01: :class:`VirtualMachineImagesOperations` - * 2018-06-01: :class:`VirtualMachineImagesOperations` - * 2018-10-01: :class:`VirtualMachineImagesOperations` - * 2019-03-01: :class:`VirtualMachineImagesOperations` - * 2019-07-01: :class:`VirtualMachineImagesOperations` """ api_version = self._get_api_version('virtual_machine_images') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineImagesOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineImagesOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineImagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineImagesOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineImagesOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineImagesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineImagesOperations 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))) @@ -662,29 +662,29 @@ def virtual_machine_images(self): def virtual_machine_run_commands(self): """Instance depends on the API version: - * 2017-03-30: :class:`VirtualMachineRunCommandsOperations` - * 2017-12-01: :class:`VirtualMachineRunCommandsOperations` - * 2018-04-01: :class:`VirtualMachineRunCommandsOperations` + * 2019-07-01: :class:`VirtualMachineRunCommandsOperations` * 2018-06-01: :class:`VirtualMachineRunCommandsOperations` - * 2018-10-01: :class:`VirtualMachineRunCommandsOperations` * 2019-03-01: :class:`VirtualMachineRunCommandsOperations` - * 2019-07-01: :class:`VirtualMachineRunCommandsOperations` + * 2017-12-01: :class:`VirtualMachineRunCommandsOperations` + * 2018-10-01: :class:`VirtualMachineRunCommandsOperations` + * 2017-03-30: :class:`VirtualMachineRunCommandsOperations` + * 2018-04-01: :class:`VirtualMachineRunCommandsOperations` """ api_version = self._get_api_version('virtual_machine_run_commands') - if api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineRunCommandsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineRunCommandsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineRunCommandsOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import VirtualMachineRunCommandsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineRunCommandsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineRunCommandsOperations 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))) @@ -693,29 +693,29 @@ def virtual_machine_run_commands(self): def virtual_machine_scale_set_extensions(self): """Instance depends on the API version: - * 2017-03-30: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2018-04-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2019-07-01: :class:`VirtualMachineScaleSetExtensionsOperations` * 2018-06-01: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetExtensionsOperations` * 2019-03-01: :class:`VirtualMachineScaleSetExtensionsOperations` - * 2019-07-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2017-03-30: :class:`VirtualMachineScaleSetExtensionsOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetExtensionsOperations` """ api_version = self._get_api_version('virtual_machine_scale_set_extensions') - if api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineScaleSetExtensionsOperations 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))) @@ -724,29 +724,29 @@ def virtual_machine_scale_set_extensions(self): def virtual_machine_scale_set_rolling_upgrades(self): """Instance depends on the API version: - * 2017-03-30: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2018-04-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2019-07-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` * 2018-06-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` * 2019-03-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` - * 2019-07-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2017-03-30: :class:`VirtualMachineScaleSetRollingUpgradesOperations` + * 2018-04-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations` """ api_version = self._get_api_version('virtual_machine_scale_set_rolling_upgrades') - if api_version == '2017-03-30': - from .v2017_03_30.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2018-04-01': - from .v2018_04_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass elif api_version == '2018-06-01': from .v2018_06_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass elif api_version == '2019-03-01': from .v2019_03_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2017-03-30': + from .v2017_03_30.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualMachineScaleSetRollingUpgradesOperations 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))) @@ -768,38 +768,38 @@ def virtual_machine_scale_set_vm_extensions(self): def virtual_machine_scale_set_vms(self): """Instance depends on the API version: - * 2015-06-15: :class:`VirtualMachineScaleSetVMsOperations` - * 2016-03-30: :class:`VirtualMachineScaleSetVMsOperations` + * 2019-07-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2018-06-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2019-03-01: :class:`VirtualMachineScaleSetVMsOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetVMsOperations` * 2016-04-30-preview: :class:`VirtualMachineScaleSetVMsOperations` + * 2016-03-30: :class:`VirtualMachineScaleSetVMsOperations` + * 2015-06-15: :class:`VirtualMachineScaleSetVMsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetVMsOperations` * 2017-03-30: :class:`VirtualMachineScaleSetVMsOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetVMsOperations` * 2018-04-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2018-06-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2019-03-01: :class:`VirtualMachineScaleSetVMsOperations` - * 2019-07-01: :class:`VirtualMachineScaleSetVMsOperations` """ api_version = self._get_api_version('virtual_machine_scale_set_vms') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineScaleSetVMsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineScaleSetVMsOperations 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))) @@ -808,38 +808,38 @@ def virtual_machine_scale_set_vms(self): def virtual_machine_scale_sets(self): """Instance depends on the API version: - * 2015-06-15: :class:`VirtualMachineScaleSetsOperations` - * 2016-03-30: :class:`VirtualMachineScaleSetsOperations` + * 2019-07-01: :class:`VirtualMachineScaleSetsOperations` + * 2018-06-01: :class:`VirtualMachineScaleSetsOperations` + * 2019-03-01: :class:`VirtualMachineScaleSetsOperations` + * 2017-12-01: :class:`VirtualMachineScaleSetsOperations` * 2016-04-30-preview: :class:`VirtualMachineScaleSetsOperations` + * 2016-03-30: :class:`VirtualMachineScaleSetsOperations` + * 2015-06-15: :class:`VirtualMachineScaleSetsOperations` + * 2018-10-01: :class:`VirtualMachineScaleSetsOperations` * 2017-03-30: :class:`VirtualMachineScaleSetsOperations` - * 2017-12-01: :class:`VirtualMachineScaleSetsOperations` * 2018-04-01: :class:`VirtualMachineScaleSetsOperations` - * 2018-06-01: :class:`VirtualMachineScaleSetsOperations` - * 2018-10-01: :class:`VirtualMachineScaleSetsOperations` - * 2019-03-01: :class:`VirtualMachineScaleSetsOperations` - * 2019-07-01: :class:`VirtualMachineScaleSetsOperations` """ api_version = self._get_api_version('virtual_machine_scale_sets') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineScaleSetsOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineScaleSetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineScaleSetsOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineScaleSetsOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineScaleSetsOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineScaleSetsOperations 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))) @@ -848,38 +848,38 @@ def virtual_machine_scale_sets(self): def virtual_machine_sizes(self): """Instance depends on the API version: - * 2015-06-15: :class:`VirtualMachineSizesOperations` - * 2016-03-30: :class:`VirtualMachineSizesOperations` + * 2019-07-01: :class:`VirtualMachineSizesOperations` + * 2018-06-01: :class:`VirtualMachineSizesOperations` + * 2019-03-01: :class:`VirtualMachineSizesOperations` + * 2017-12-01: :class:`VirtualMachineSizesOperations` * 2016-04-30-preview: :class:`VirtualMachineSizesOperations` + * 2016-03-30: :class:`VirtualMachineSizesOperations` + * 2015-06-15: :class:`VirtualMachineSizesOperations` + * 2018-10-01: :class:`VirtualMachineSizesOperations` * 2017-03-30: :class:`VirtualMachineSizesOperations` - * 2017-12-01: :class:`VirtualMachineSizesOperations` * 2018-04-01: :class:`VirtualMachineSizesOperations` - * 2018-06-01: :class:`VirtualMachineSizesOperations` - * 2018-10-01: :class:`VirtualMachineSizesOperations` - * 2019-03-01: :class:`VirtualMachineSizesOperations` - * 2019-07-01: :class:`VirtualMachineSizesOperations` """ api_version = self._get_api_version('virtual_machine_sizes') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachineSizesOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachineSizesOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachineSizesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachineSizesOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachineSizesOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachineSizesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachineSizesOperations 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))) @@ -888,38 +888,38 @@ def virtual_machine_sizes(self): def virtual_machines(self): """Instance depends on the API version: - * 2015-06-15: :class:`VirtualMachinesOperations` - * 2016-03-30: :class:`VirtualMachinesOperations` + * 2019-07-01: :class:`VirtualMachinesOperations` + * 2018-06-01: :class:`VirtualMachinesOperations` + * 2019-03-01: :class:`VirtualMachinesOperations` + * 2017-12-01: :class:`VirtualMachinesOperations` * 2016-04-30-preview: :class:`VirtualMachinesOperations` + * 2016-03-30: :class:`VirtualMachinesOperations` + * 2015-06-15: :class:`VirtualMachinesOperations` + * 2018-10-01: :class:`VirtualMachinesOperations` * 2017-03-30: :class:`VirtualMachinesOperations` - * 2017-12-01: :class:`VirtualMachinesOperations` * 2018-04-01: :class:`VirtualMachinesOperations` - * 2018-06-01: :class:`VirtualMachinesOperations` - * 2018-10-01: :class:`VirtualMachinesOperations` - * 2019-03-01: :class:`VirtualMachinesOperations` - * 2019-07-01: :class:`VirtualMachinesOperations` """ api_version = self._get_api_version('virtual_machines') - if api_version == '2015-06-15': - from .v2015_06_15.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2016-03-30': - from .v2016_03_30.operations import VirtualMachinesOperations as OperationClass + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2019-03-01': + from .v2019_03_01.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2017-12-01': + from .v2017_12_01.operations import VirtualMachinesOperations as OperationClass elif api_version == '2016-04-30-preview': from .v2016_04_30_preview.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2016-03-30': + from .v2016_03_30.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualMachinesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualMachinesOperations as OperationClass elif api_version == '2017-03-30': from .v2017_03_30.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2017-12-01': - from .v2017_12_01.operations import VirtualMachinesOperations as OperationClass elif api_version == '2018-04-01': from .v2018_04_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2018-06-01': - from .v2018_06_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2018-10-01': - from .v2018_10_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2019-03-01': - from .v2019_03_01.operations import VirtualMachinesOperations as OperationClass - elif api_version == '2019-07-01': - from .v2019_07_01.operations import VirtualMachinesOperations 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))) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py index 92be01068a9b..832d516d9b8c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/__init__.py @@ -47,6 +47,7 @@ from ._models_py3 import DiskSku from ._models_py3 import DiskUpdate from ._models_py3 import Encryption + from ._models_py3 import EncryptionSetIdentity from ._models_py3 import EncryptionSettingsCollection from ._models_py3 import EncryptionSettingsElement from ._models_py3 import Gallery @@ -104,7 +105,6 @@ from ._models_py3 import ReplicationStatus from ._models_py3 import RequestRateByIntervalInput from ._models_py3 import Resource - from ._models_py3 import ResourceIdentity from ._models_py3 import ResourceRange from ._models_py3 import RollbackStatusInfo from ._models_py3 import RollingUpgradePolicy @@ -245,6 +245,7 @@ from ._models import DiskSku from ._models import DiskUpdate from ._models import Encryption + from ._models import EncryptionSetIdentity from ._models import EncryptionSettingsCollection from ._models import EncryptionSettingsElement from ._models import Gallery @@ -302,7 +303,6 @@ from ._models import ReplicationStatus from ._models import RequestRateByIntervalInput from ._models import Resource - from ._models import ResourceIdentity from ._models import ResourceRange from ._models import RollbackStatusInfo from ._models import RollingUpgradePolicy @@ -513,6 +513,7 @@ 'DiskSku', 'DiskUpdate', 'Encryption', + 'EncryptionSetIdentity', 'EncryptionSettingsCollection', 'EncryptionSettingsElement', 'Gallery', @@ -570,7 +571,6 @@ 'ReplicationStatus', 'RequestRateByIntervalInput', 'Resource', - 'ResourceIdentity', 'ResourceRange', 'RollbackStatusInfo', 'RollingUpgradePolicy', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py index c2ed0104c780..cc0dc1dc2fed 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models.py @@ -1361,7 +1361,8 @@ class DiskEncryptionSet(Resource): :param tags: Resource tags :type tags: dict[str, str] :param identity: - :type identity: ~azure.mgmt.compute.v2019_07_01.models.ResourceIdentity + :type identity: + ~azure.mgmt.compute.v2019_07_01.models.EncryptionSetIdentity :param active_key: The key vault key which is currently used by this disk encryption set. :type active_key: @@ -1390,7 +1391,7 @@ class DiskEncryptionSet(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'identity': {'key': 'identity', 'type': 'EncryptionSetIdentity'}, 'active_key': {'key': 'properties.activeKey', 'type': 'KeyVaultAndKeyReference'}, 'previous_keys': {'key': 'properties.previousKeys', 'type': '[KeyVaultAndKeyReference]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -1627,6 +1628,46 @@ def __init__(self, **kwargs): self.type = kwargs.get('type', None) +class EncryptionSetIdentity(Model): + """The managed identity for the disk encryption set. It should be given + permission on the key vault before it can be used to encrypt disks. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: The type of Managed Identity used by the DiskEncryptionSet. + Only SystemAssigned is supported. Possible values include: + 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSetIdentityType + :ivar principal_id: The object id of the Managed Identity Resource. This + will be sent to the RP from ARM via the x-ms-identity-principal-id header + in the PUT request if the resource has a systemAssigned(implicit) identity + :vartype principal_id: str + :ivar tenant_id: The tenant id of the Managed Identity Resource. This will + be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT + request if the resource has a systemAssigned(implicit) identity + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionSetIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = None + self.tenant_id = None + + class EncryptionSettingsCollection(Model): """Encryption settings for disk or snapshot. @@ -3953,46 +3994,6 @@ def __init__(self, **kwargs): self.interval_length = kwargs.get('interval_length', None) -class ResourceIdentity(Model): - """The managed identity for the disk encryption set. It should be given - permission on the key vault before it can be used to encrypt disks. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param type: The type of Managed Identity used by the DiskEncryptionSet. - Only SystemAssigned is supported. Possible values include: - 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSetIdentityType - :ivar principal_id: The object id of the Managed Identity Resource. This - will be sent to the RP from ARM via the x-ms-identity-principal-id header - in the PUT request if the resource has a systemAssigned(implicit) identity - :vartype principal_id: str - :ivar tenant_id: The tenant id of the Managed Identity Resource. This will - be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT - request if the resource has a systemAssigned(implicit) identity - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = None - self.tenant_id = None - - class ResourceRange(Model): """Describes the resource range. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py index 6d81a8e0bf4a..3092d0a33439 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/models/_models_py3.py @@ -1361,7 +1361,8 @@ class DiskEncryptionSet(Resource): :param tags: Resource tags :type tags: dict[str, str] :param identity: - :type identity: ~azure.mgmt.compute.v2019_07_01.models.ResourceIdentity + :type identity: + ~azure.mgmt.compute.v2019_07_01.models.EncryptionSetIdentity :param active_key: The key vault key which is currently used by this disk encryption set. :type active_key: @@ -1390,7 +1391,7 @@ class DiskEncryptionSet(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'identity': {'key': 'identity', 'type': 'EncryptionSetIdentity'}, 'active_key': {'key': 'properties.activeKey', 'type': 'KeyVaultAndKeyReference'}, 'previous_keys': {'key': 'properties.previousKeys', 'type': '[KeyVaultAndKeyReference]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -1627,6 +1628,46 @@ def __init__(self, *, type, disk_encryption_set_id: str=None, **kwargs) -> None: self.type = type +class EncryptionSetIdentity(Model): + """The managed identity for the disk encryption set. It should be given + permission on the key vault before it can be used to encrypt disks. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param type: The type of Managed Identity used by the DiskEncryptionSet. + Only SystemAssigned is supported. Possible values include: + 'SystemAssigned' + :type type: str or + ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSetIdentityType + :ivar principal_id: The object id of the Managed Identity Resource. This + will be sent to the RP from ARM via the x-ms-identity-principal-id header + in the PUT request if the resource has a systemAssigned(implicit) identity + :vartype principal_id: str + :ivar tenant_id: The tenant id of the Managed Identity Resource. This will + be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT + request if the resource has a systemAssigned(implicit) identity + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(EncryptionSetIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + + class EncryptionSettingsCollection(Model): """Encryption settings for disk or snapshot. @@ -3953,46 +3994,6 @@ def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_ self.interval_length = interval_length -class ResourceIdentity(Model): - """The managed identity for the disk encryption set. It should be given - permission on the key vault before it can be used to encrypt disks. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param type: The type of Managed Identity used by the DiskEncryptionSet. - Only SystemAssigned is supported. Possible values include: - 'SystemAssigned' - :type type: str or - ~azure.mgmt.compute.v2019_07_01.models.DiskEncryptionSetIdentityType - :ivar principal_id: The object id of the Managed Identity Resource. This - will be sent to the RP from ARM via the x-ms-identity-principal-id header - in the PUT request if the resource has a systemAssigned(implicit) identity - :vartype principal_id: str - :ivar tenant_id: The tenant id of the Managed Identity Resource. This will - be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT - request if the resource has a systemAssigned(implicit) identity - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__(self, *, type=None, **kwargs) -> None: - super(ResourceIdentity, self).__init__(**kwargs) - self.type = type - self.principal_id = None - self.tenant_id = None - - class ResourceRange(Model): """Describes the resource range. diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py index 184b8ddbd0f6..5e2a225f4cbe 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .consumption_management_client import ConsumptionManagementClient -from .version import VERSION +from ._configuration import ConsumptionManagementClientConfiguration +from ._consumption_management_client import ConsumptionManagementClient +__all__ = ['ConsumptionManagementClient', 'ConsumptionManagementClientConfiguration'] -__all__ = ['ConsumptionManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py new file mode 100644 index 000000000000..eb9e99e2d39a --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ConsumptionManagementClientConfiguration(AzureConfiguration): + """Configuration for ConsumptionManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure Subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, 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 not base_url: + base_url = 'https://management.azure.com' + + super(ConsumptionManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-consumption/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py similarity index 69% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py index b3a48986494c..0a7817d95ea4 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/_consumption_management_client.py @@ -11,54 +11,26 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.usage_details_operations import UsageDetailsOperations -from .operations.marketplaces_operations import MarketplacesOperations -from .operations.budgets_operations import BudgetsOperations -from .operations.tags_operations import TagsOperations -from .operations.charges_operations import ChargesOperations -from .operations.balances_operations import BalancesOperations -from .operations.reservations_summaries_operations import ReservationsSummariesOperations -from .operations.reservations_details_operations import ReservationsDetailsOperations -from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations -from .operations.price_sheet_operations import PriceSheetOperations -from .operations.forecasts_operations import ForecastsOperations -from .operations.operations import Operations -from .operations.aggregated_cost_operations import AggregatedCostOperations -from . import models - - -class ConsumptionManagementClientConfiguration(AzureConfiguration): - """Configuration for ConsumptionManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure Subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - def __init__( - self, credentials, subscription_id, 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 not base_url: - base_url = 'https://management.azure.com' - - super(ConsumptionManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-consumption/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import ConsumptionManagementClientConfiguration +from .operations import UsageDetailsOperations +from .operations import MarketplacesOperations +from .operations import BudgetsOperations +from .operations import TagsOperations +from .operations import ChargesOperations +from .operations import BalancesOperations +from .operations import ReservationsSummariesOperations +from .operations import ReservationsDetailsOperations +from .operations import ReservationRecommendationsOperations +from .operations import ReservationTransactionsOperations +from .operations import PriceSheetOperations +from .operations import ForecastsOperations +from .operations import Operations +from .operations import AggregatedCostOperations +from .operations import EventsOperations +from .operations import LotsOperations +from .operations import CreditsOperations +from . import models class ConsumptionManagementClient(SDKClient): @@ -85,6 +57,8 @@ class ConsumptionManagementClient(SDKClient): :vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations :ivar reservation_recommendations: ReservationRecommendations operations :vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations + :ivar reservation_transactions: ReservationTransactions operations + :vartype reservation_transactions: azure.mgmt.consumption.operations.ReservationTransactionsOperations :ivar price_sheet: PriceSheet operations :vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations :ivar forecasts: Forecasts operations @@ -93,6 +67,12 @@ class ConsumptionManagementClient(SDKClient): :vartype operations: azure.mgmt.consumption.operations.Operations :ivar aggregated_cost: AggregatedCost operations :vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations + :ivar events: Events operations + :vartype events: azure.mgmt.consumption.operations.EventsOperations + :ivar lots: Lots operations + :vartype lots: azure.mgmt.consumption.operations.LotsOperations + :ivar credits: Credits operations + :vartype credits: azure.mgmt.consumption.operations.CreditsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -109,7 +89,7 @@ def __init__( super(ConsumptionManagementClient, 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-04-01-preview' + self.api_version = '2019-10-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -131,6 +111,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.reservation_recommendations = ReservationRecommendationsOperations( self._client, self.config, self._serialize, self._deserialize) + self.reservation_transactions = ReservationTransactionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.price_sheet = PriceSheetOperations( self._client, self.config, self._serialize, self._deserialize) self.forecasts = ForecastsOperations( @@ -139,3 +121,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.aggregated_cost = AggregatedCostOperations( self._client, self.config, self._serialize, self._deserialize) + self.events = EventsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.lots = LotsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.credits = CreditsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py index b9815d6ee2d5..a4b4bcb74497 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py @@ -10,80 +10,107 @@ # -------------------------------------------------------------------------- try: - from .meter_details_py3 import MeterDetails - from .meter_details_response_py3 import MeterDetailsResponse - from .usage_detail_py3 import UsageDetail - from .usage_details_download_response_py3 import UsageDetailsDownloadResponse - from .marketplace_py3 import Marketplace - from .balance_properties_new_purchases_details_item_py3 import BalancePropertiesNewPurchasesDetailsItem - from .balance_properties_adjustment_details_item_py3 import BalancePropertiesAdjustmentDetailsItem - from .balance_py3 import Balance - from .reservation_summary_py3 import ReservationSummary - from .reservation_detail_py3 import ReservationDetail - from .reservation_recommendation_py3 import ReservationRecommendation - from .tag_py3 import Tag - from .tags_result_py3 import TagsResult - from .budget_time_period_py3 import BudgetTimePeriod - from .filters_py3 import Filters - from .current_spend_py3 import CurrentSpend - from .notification_py3 import Notification - from .budget_py3 import Budget - from .price_sheet_properties_py3 import PriceSheetProperties - from .price_sheet_result_py3 import PriceSheetResult - from .forecast_properties_confidence_levels_item_py3 import ForecastPropertiesConfidenceLevelsItem - from .forecast_py3 import Forecast - from .management_group_aggregated_cost_result_py3 import ManagementGroupAggregatedCostResult - from .charge_summary_py3 import ChargeSummary - from .charges_list_result_py3 import ChargesListResult - from .error_details_py3 import ErrorDetails - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .resource_py3 import Resource - from .resource_attributes_py3 import ResourceAttributes - from .proxy_resource_py3 import ProxyResource + from ._models_py3 import Amount + from ._models_py3 import Balance + from ._models_py3 import BalancePropertiesAdjustmentDetailsItem + from ._models_py3 import BalancePropertiesNewPurchasesDetailsItem + from ._models_py3 import Budget + from ._models_py3 import BudgetTimePeriod + from ._models_py3 import ChargesListResult + from ._models_py3 import ChargeSummary + from ._models_py3 import CreditBalanceSummary + from ._models_py3 import CreditSummary + from ._models_py3 import CurrentSpend + from ._models_py3 import ErrorDetails + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import EventSummary + from ._models_py3 import Filters + from ._models_py3 import Forecast + from ._models_py3 import ForecastPropertiesConfidenceLevelsItem + from ._models_py3 import LegacyChargeSummary + from ._models_py3 import LegacyReservationRecommendation + from ._models_py3 import LegacyUsageDetail + from ._models_py3 import LotSummary + from ._models_py3 import ManagementGroupAggregatedCostResult + from ._models_py3 import Marketplace + from ._models_py3 import MeterDetails + from ._models_py3 import MeterDetailsResponse + from ._models_py3 import ModernChargeSummary + from ._models_py3 import ModernReservationRecommendation + from ._models_py3 import ModernUsageDetail + from ._models_py3 import Notification + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PriceSheetProperties + from ._models_py3 import PriceSheetResult + from ._models_py3 import ProxyResource + from ._models_py3 import ReservationDetail + from ._models_py3 import ReservationRecommendation + from ._models_py3 import ReservationSummary + from ._models_py3 import ReservationTransaction + from ._models_py3 import Resource + from ._models_py3 import ResourceAttributes + from ._models_py3 import SkuProperty + from ._models_py3 import Tag + from ._models_py3 import TagsResult + from ._models_py3 import UsageDetail except (SyntaxError, ImportError): - from .meter_details import MeterDetails - from .meter_details_response import MeterDetailsResponse - from .usage_detail import UsageDetail - from .usage_details_download_response import UsageDetailsDownloadResponse - from .marketplace import Marketplace - from .balance_properties_new_purchases_details_item import BalancePropertiesNewPurchasesDetailsItem - from .balance_properties_adjustment_details_item import BalancePropertiesAdjustmentDetailsItem - from .balance import Balance - from .reservation_summary import ReservationSummary - from .reservation_detail import ReservationDetail - from .reservation_recommendation import ReservationRecommendation - from .tag import Tag - from .tags_result import TagsResult - from .budget_time_period import BudgetTimePeriod - from .filters import Filters - from .current_spend import CurrentSpend - from .notification import Notification - from .budget import Budget - from .price_sheet_properties import PriceSheetProperties - from .price_sheet_result import PriceSheetResult - from .forecast_properties_confidence_levels_item import ForecastPropertiesConfidenceLevelsItem - from .forecast import Forecast - from .management_group_aggregated_cost_result import ManagementGroupAggregatedCostResult - from .charge_summary import ChargeSummary - from .charges_list_result import ChargesListResult - from .error_details import ErrorDetails - from .error_response import ErrorResponse, ErrorResponseException - from .operation_display import OperationDisplay - from .operation import Operation - from .resource import Resource - from .resource_attributes import ResourceAttributes - from .proxy_resource import ProxyResource -from .usage_detail_paged import UsageDetailPaged -from .marketplace_paged import MarketplacePaged -from .budget_paged import BudgetPaged -from .reservation_summary_paged import ReservationSummaryPaged -from .reservation_detail_paged import ReservationDetailPaged -from .reservation_recommendation_paged import ReservationRecommendationPaged -from .forecast_paged import ForecastPaged -from .operation_paged import OperationPaged -from .consumption_management_client_enums import ( + from ._models import Amount + from ._models import Balance + from ._models import BalancePropertiesAdjustmentDetailsItem + from ._models import BalancePropertiesNewPurchasesDetailsItem + from ._models import Budget + from ._models import BudgetTimePeriod + from ._models import ChargesListResult + from ._models import ChargeSummary + from ._models import CreditBalanceSummary + from ._models import CreditSummary + from ._models import CurrentSpend + from ._models import ErrorDetails + from ._models import ErrorResponse, ErrorResponseException + from ._models import EventSummary + from ._models import Filters + from ._models import Forecast + from ._models import ForecastPropertiesConfidenceLevelsItem + from ._models import LegacyChargeSummary + from ._models import LegacyReservationRecommendation + from ._models import LegacyUsageDetail + from ._models import LotSummary + from ._models import ManagementGroupAggregatedCostResult + from ._models import Marketplace + from ._models import MeterDetails + from ._models import MeterDetailsResponse + from ._models import ModernChargeSummary + from ._models import ModernReservationRecommendation + from ._models import ModernUsageDetail + from ._models import Notification + from ._models import Operation + from ._models import OperationDisplay + from ._models import PriceSheetProperties + from ._models import PriceSheetResult + from ._models import ProxyResource + from ._models import ReservationDetail + from ._models import ReservationRecommendation + from ._models import ReservationSummary + from ._models import ReservationTransaction + from ._models import Resource + from ._models import ResourceAttributes + from ._models import SkuProperty + from ._models import Tag + from ._models import TagsResult + from ._models import UsageDetail +from ._paged_models import BudgetPaged +from ._paged_models import EventSummaryPaged +from ._paged_models import ForecastPaged +from ._paged_models import LotSummaryPaged +from ._paged_models import MarketplacePaged +from ._paged_models import OperationPaged +from ._paged_models import ReservationDetailPaged +from ._paged_models import ReservationRecommendationPaged +from ._paged_models import ReservationSummaryPaged +from ._paged_models import ReservationTransactionPaged +from ._paged_models import UsageDetailPaged +from ._consumption_management_client_enums import ( BillingFrequency, CategoryType, TimeGrainType, @@ -91,51 +118,68 @@ Grain, ChargeType, Bound, + EventType, + LotSource, Datagrain, Metrictype, ) __all__ = [ - 'MeterDetails', - 'MeterDetailsResponse', - 'UsageDetail', - 'UsageDetailsDownloadResponse', - 'Marketplace', - 'BalancePropertiesNewPurchasesDetailsItem', - 'BalancePropertiesAdjustmentDetailsItem', + 'Amount', 'Balance', - 'ReservationSummary', - 'ReservationDetail', - 'ReservationRecommendation', - 'Tag', - 'TagsResult', - 'BudgetTimePeriod', - 'Filters', - 'CurrentSpend', - 'Notification', + 'BalancePropertiesAdjustmentDetailsItem', + 'BalancePropertiesNewPurchasesDetailsItem', 'Budget', - 'PriceSheetProperties', - 'PriceSheetResult', - 'ForecastPropertiesConfidenceLevelsItem', - 'Forecast', - 'ManagementGroupAggregatedCostResult', - 'ChargeSummary', + 'BudgetTimePeriod', 'ChargesListResult', + 'ChargeSummary', + 'CreditBalanceSummary', + 'CreditSummary', + 'CurrentSpend', 'ErrorDetails', 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', + 'EventSummary', + 'Filters', + 'Forecast', + 'ForecastPropertiesConfidenceLevelsItem', + 'LegacyChargeSummary', + 'LegacyReservationRecommendation', + 'LegacyUsageDetail', + 'LotSummary', + 'ManagementGroupAggregatedCostResult', + 'Marketplace', + 'MeterDetails', + 'MeterDetailsResponse', + 'ModernChargeSummary', + 'ModernReservationRecommendation', + 'ModernUsageDetail', + 'Notification', 'Operation', + 'OperationDisplay', + 'PriceSheetProperties', + 'PriceSheetResult', + 'ProxyResource', + 'ReservationDetail', + 'ReservationRecommendation', + 'ReservationSummary', + 'ReservationTransaction', 'Resource', 'ResourceAttributes', - 'ProxyResource', + 'SkuProperty', + 'Tag', + 'TagsResult', + 'UsageDetail', 'UsageDetailPaged', 'MarketplacePaged', 'BudgetPaged', 'ReservationSummaryPaged', 'ReservationDetailPaged', 'ReservationRecommendationPaged', + 'ReservationTransactionPaged', 'ForecastPaged', 'OperationPaged', + 'EventSummaryPaged', + 'LotSummaryPaged', 'BillingFrequency', 'CategoryType', 'TimeGrainType', @@ -143,6 +187,8 @@ 'Grain', 'ChargeType', 'Bound', + 'EventType', + 'LotSource', 'Datagrain', 'Metrictype', ] diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py similarity index 74% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py index b888ebdec7e0..9b31e9f27db8 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_consumption_management_client_enums.py @@ -30,6 +30,9 @@ class TimeGrainType(str, Enum): monthly = "Monthly" quarterly = "Quarterly" annually = "Annually" + billing_month = "BillingMonth" + billing_quarter = "BillingQuarter" + billing_annual = "BillingAnnual" class OperatorType(str, Enum): @@ -58,6 +61,23 @@ class Bound(str, Enum): lower = "Lower" +class EventType(str, Enum): + + settled_charges = "SettledCharges" + pending_charges = "PendingCharges" + pending_adjustments = "PendingAdjustments" + pending_new_credit = "PendingNewCredit" + pending_expired_credit = "PendingExpiredCredit" + un_known = "UnKnown" + new_credit = "NewCredit" + + +class LotSource(str, Enum): + + purchased_credit = "PurchasedCredit" + promotional_credit = "PromotionalCredit" + + class Datagrain(str, Enum): daily_grain = "daily" #: Daily grain of data diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py new file mode 100644 index 000000000000..450f6e010aa9 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models.py @@ -0,0 +1,3243 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Amount(Model): + """The amount plus currency . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar currency: Amount currency. + :vartype currency: str + :ivar value: Amount. + :vartype value: decimal.Decimal + """ + + _validation = { + 'currency': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'currency': {'key': 'currency', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(Amount, self).__init__(**kwargs) + self.currency = None + self.value = None + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + + +class Balance(Resource): + """A balance resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar beginning_balance: The beginning balance for the billing period. + :vartype beginning_balance: decimal.Decimal + :ivar ending_balance: The ending balance for the billing period (for open + periods this will be updated daily). + :vartype ending_balance: decimal.Decimal + :ivar new_purchases: Total new purchase amount. + :vartype new_purchases: decimal.Decimal + :ivar adjustments: Total adjustment amount. + :vartype adjustments: decimal.Decimal + :ivar utilized: Total Commitment usage. + :vartype utilized: decimal.Decimal + :ivar service_overage: Overage for Azure services. + :vartype service_overage: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar total_overage: serviceOverage + chargesBilledSeparately. + :vartype total_overage: decimal.Decimal + :ivar total_usage: Azure service commitment + total Overage. + :vartype total_usage: decimal.Decimal + :ivar azure_marketplace_service_charges: Total charges for Azure + Marketplace. + :vartype azure_marketplace_service_charges: decimal.Decimal + :param billing_frequency: The billing frequency. Possible values include: + 'Month', 'Quarter', 'Year' + :type billing_frequency: str or + ~azure.mgmt.consumption.models.BillingFrequency + :ivar price_hidden: Price is hidden or not. + :vartype price_hidden: bool + :ivar new_purchases_details: List of new purchases. + :vartype new_purchases_details: + list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] + :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit + etc.). + :vartype adjustment_details: + list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'currency': {'readonly': True}, + 'beginning_balance': {'readonly': True}, + 'ending_balance': {'readonly': True}, + 'new_purchases': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'utilized': {'readonly': True}, + 'service_overage': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'total_overage': {'readonly': True}, + 'total_usage': {'readonly': True}, + 'azure_marketplace_service_charges': {'readonly': True}, + 'price_hidden': {'readonly': True}, + 'new_purchases_details': {'readonly': True}, + 'adjustment_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, + 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, + 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, + 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, + 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, + 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, + 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, + 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, + 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, + 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, + 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, + } + + def __init__(self, **kwargs): + super(Balance, self).__init__(**kwargs) + self.currency = None + self.beginning_balance = None + self.ending_balance = None + self.new_purchases = None + self.adjustments = None + self.utilized = None + self.service_overage = None + self.charges_billed_separately = None + self.total_overage = None + self.total_usage = None + self.azure_marketplace_service_charges = None + self.billing_frequency = kwargs.get('billing_frequency', None) + self.price_hidden = None + self.new_purchases_details = None + self.adjustment_details = None + + +class BalancePropertiesAdjustmentDetailsItem(Model): + """BalancePropertiesAdjustmentDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new adjustment. + :vartype name: str + :ivar value: the value of new adjustment. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class BalancePropertiesNewPurchasesDetailsItem(Model): + """BalancePropertiesNewPurchasesDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new purchase. + :vartype name: str + :ivar value: the value of new purchase. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ProxyResource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.e_tag = kwargs.get('e_tag', None) + + +class Budget(ProxyResource): + """A budget resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param category: Required. The category of the budget, whether the budget + tracks cost or usage. Possible values include: 'Cost', 'Usage' + :type category: str or ~azure.mgmt.consumption.models.CategoryType + :param amount: Required. The total amount of cost to track with the budget + :type amount: decimal.Decimal + :param time_grain: Required. The time covered by a budget. Tracking of the + amount will be reset based on the time grain. Possible values include: + 'Monthly', 'Quarterly', 'Annually', 'BillingMonth', 'BillingQuarter', + 'BillingAnnual' + :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType + :param time_period: Required. Has start and end date of the budget. The + start date must be first of the month and should be less than the end + date. Budget start date must be on or after June 1, 2017. Future start + date should not be more than three months. Past start date should be + selected within the timegrain period. There are no restrictions on the end + date. + :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod + :param filters: May be used to filter budgets by resource group, resource, + or meter. + :type filters: ~azure.mgmt.consumption.models.Filters + :ivar current_spend: The current amount of cost which is being tracked for + a budget. + :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend + :param notifications: Dictionary of notifications associated with the + budget. Budget can have up to five notifications. + :type notifications: dict[str, + ~azure.mgmt.consumption.models.Notification] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category': {'required': True}, + 'amount': {'required': True}, + 'time_grain': {'required': True}, + 'time_period': {'required': True}, + 'current_spend': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'amount': {'key': 'properties.amount', 'type': 'decimal'}, + 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, + 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, + 'filters': {'key': 'properties.filters', 'type': 'Filters'}, + 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, + 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, + } + + def __init__(self, **kwargs): + super(Budget, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.amount = kwargs.get('amount', None) + self.time_grain = kwargs.get('time_grain', None) + self.time_period = kwargs.get('time_period', None) + self.filters = kwargs.get('filters', None) + self.current_spend = None + self.notifications = kwargs.get('notifications', None) + + +class BudgetTimePeriod(Model): + """The start and end date for a budget. + + All required parameters must be populated in order to send to Azure. + + :param start_date: Required. The start date for the budget. + :type start_date: datetime + :param end_date: The end date for the budget. If not provided, we default + this to 10 years from the start date. + :type end_date: datetime + """ + + _validation = { + 'start_date': {'required': True}, + } + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(BudgetTimePeriod, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + + +class ChargesListResult(Model): + """Result of listing charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary + :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummary]'}, + } + + def __init__(self, **kwargs): + super(ChargesListResult, self).__init__(**kwargs) + self.value = None + + +class ChargeSummary(Resource): + """A charge summary resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LegacyChargeSummary, ModernChargeSummary + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'legacy': 'LegacyChargeSummary', 'modern': 'ModernChargeSummary'} + } + + def __init__(self, **kwargs): + super(ChargeSummary, self).__init__(**kwargs) + self.kind = None + self.kind = 'ChargeSummary' + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CreditBalanceSummary(Model): + """Summary of credit balances. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar estimated_balance: Estimated balance. + :vartype estimated_balance: ~azure.mgmt.consumption.models.Amount + :ivar current_balance: Current balance. + :vartype current_balance: ~azure.mgmt.consumption.models.Amount + """ + + _validation = { + 'estimated_balance': {'readonly': True}, + 'current_balance': {'readonly': True}, + } + + _attribute_map = { + 'estimated_balance': {'key': 'estimatedBalance', 'type': 'Amount'}, + 'current_balance': {'key': 'currentBalance', 'type': 'Amount'}, + } + + def __init__(self, **kwargs): + super(CreditBalanceSummary, self).__init__(**kwargs) + self.estimated_balance = None + self.current_balance = None + + +class CreditSummary(Resource): + """A credit summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar balance_summary: Summary of balances associated with this credit + summary. + :vartype balance_summary: + ~azure.mgmt.consumption.models.CreditBalanceSummary + :ivar pending_credit_adjustments: Pending credit adjustments. + :vartype pending_credit_adjustments: ~azure.mgmt.consumption.models.Amount + :ivar expired_credit: Expired credit. + :vartype expired_credit: ~azure.mgmt.consumption.models.Amount + :ivar pending_eligible_charges: Pending eligible charges. + :vartype pending_eligible_charges: ~azure.mgmt.consumption.models.Amount + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'balance_summary': {'readonly': True}, + 'pending_credit_adjustments': {'readonly': True}, + 'expired_credit': {'readonly': True}, + 'pending_eligible_charges': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'balance_summary': {'key': 'properties.balanceSummary', 'type': 'CreditBalanceSummary'}, + 'pending_credit_adjustments': {'key': 'properties.pendingCreditAdjustments', 'type': 'Amount'}, + 'expired_credit': {'key': 'properties.expiredCredit', 'type': 'Amount'}, + 'pending_eligible_charges': {'key': 'properties.pendingEligibleCharges', 'type': 'Amount'}, + } + + def __init__(self, **kwargs): + super(CreditSummary, self).__init__(**kwargs) + self.balance_summary = None + self.pending_credit_adjustments = None + self.expired_credit = None + self.pending_eligible_charges = None + + +class CurrentSpend(Model): + """The current amount of cost which is being tracked for a budget. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar amount: The total amount of cost which is being tracked by the + budget. + :vartype amount: decimal.Decimal + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + 'amount': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'amount': {'key': 'amount', 'type': 'decimal'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CurrentSpend, self).__init__(**kwargs) + self.amount = None + self.unit = None + + +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.consumption.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class EventSummary(Resource): + """An event summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar transaction_date: Transaction date. + :vartype transaction_date: datetime + :ivar description: Transaction description. + :vartype description: str + :ivar new_credit: New Credit. + :vartype new_credit: ~azure.mgmt.consumption.models.Amount + :ivar adjustments: Adjustments amount. + :vartype adjustments: ~azure.mgmt.consumption.models.Amount + :ivar credit_expired: Credit expired. + :vartype credit_expired: ~azure.mgmt.consumption.models.Amount + :ivar charges: Charges amount. + :vartype charges: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :param event_type: The type of event. Possible values include: + 'SettledCharges', 'PendingCharges', 'PendingAdjustments', + 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' + :type event_type: str or ~azure.mgmt.consumption.models.EventType + :ivar invoice_number: Invoice number. + :vartype invoice_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'transaction_date': {'readonly': True}, + 'description': {'readonly': True}, + 'new_credit': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'credit_expired': {'readonly': True}, + 'charges': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'invoice_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'transaction_date': {'key': 'properties.transactionDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'new_credit': {'key': 'properties.newCredit', 'type': 'Amount'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'Amount'}, + 'credit_expired': {'key': 'properties.creditExpired', 'type': 'Amount'}, + 'charges': {'key': 'properties.charges', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'event_type': {'key': 'properties.eventType', 'type': 'str'}, + 'invoice_number': {'key': 'properties.invoiceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventSummary, self).__init__(**kwargs) + self.transaction_date = None + self.description = None + self.new_credit = None + self.adjustments = None + self.credit_expired = None + self.charges = None + self.closed_balance = None + self.event_type = kwargs.get('event_type', None) + self.invoice_number = None + + +class Filters(Model): + """May be used to filter budgets by resource group, resource, or meter. + + :param resource_groups: The list of filters on resource groups, allowed at + subscription level only. + :type resource_groups: list[str] + :param resources: The list of filters on resources. + :type resources: list[str] + :param meters: The list of filters on meters (GUID), mandatory for budgets + of usage category. + :type meters: list[str] + :param tags: The dictionary of filters on tags. + :type tags: dict[str, list[str]] + """ + + _validation = { + 'resource_groups': {'max_items': 10, 'min_items': 0}, + 'resources': {'max_items': 10, 'min_items': 0}, + 'meters': {'max_items': 10, 'min_items': 0}, + } + + _attribute_map = { + 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + 'meters': {'key': 'meters', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{[str]}'}, + } + + def __init__(self, **kwargs): + super(Filters, self).__init__(**kwargs) + self.resource_groups = kwargs.get('resource_groups', None) + self.resources = kwargs.get('resources', None) + self.meters = kwargs.get('meters', None) + self.tags = kwargs.get('tags', None) + + +class Forecast(Resource): + """A forecast resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar usage_date: The usage date of the forecast. + :vartype usage_date: str + :param grain: The granularity of forecast. Possible values include: + 'Daily', 'Monthly', 'Yearly' + :type grain: str or ~azure.mgmt.consumption.models.Grain + :ivar charge: The amount of charge + :vartype charge: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param charge_type: The type of the charge. Could be actual or forecast. + Possible values include: 'Actual', 'Forecast' + :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType + :ivar confidence_levels: The details about the forecast confidence levels. + This is populated only when chargeType is Forecast. + :vartype confidence_levels: + list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'charge': {'readonly': True}, + 'currency': {'readonly': True}, + 'confidence_levels': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, + 'grain': {'key': 'properties.grain', 'type': 'str'}, + 'charge': {'key': 'properties.charge', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, + } + + def __init__(self, **kwargs): + super(Forecast, self).__init__(**kwargs) + self.usage_date = None + self.grain = kwargs.get('grain', None) + self.charge = None + self.currency = None + self.charge_type = kwargs.get('charge_type', None) + self.confidence_levels = None + + +class ForecastPropertiesConfidenceLevelsItem(Model): + """ForecastPropertiesConfidenceLevelsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percentage: The percentage level of the confidence + :vartype percentage: decimal.Decimal + :param bound: The boundary of the percentage, values could be 'Upper' or + 'Lower'. Possible values include: 'Upper', 'Lower' + :type bound: str or ~azure.mgmt.consumption.models.Bound + :ivar value: The amount of forecast within the percentage level + :vartype value: decimal.Decimal + """ + + _validation = { + 'percentage': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'decimal'}, + 'bound': {'key': 'bound', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) + self.percentage = None + self.bound = kwargs.get('bound', None) + self.value = None + + +class LegacyChargeSummary(ChargeSummary): + """Legacy charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_period_id: The id of the billing period resource that the + charge belongs to. + :vartype billing_period_id: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LegacyChargeSummary, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None + self.kind = 'legacy' + + +class ReservationRecommendation(Model): + """A reservation recommendation resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LegacyReservationRecommendation, + ModernReservationRecommendation + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'legacy': 'LegacyReservationRecommendation', 'modern': 'ModernReservationRecommendation'} + } + + def __init__(self, **kwargs): + super(ReservationRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + self.location = None + self.sku = None + self.kind = None + + +class LegacyReservationRecommendation(ReservationRecommendation): + """Legacy reservation recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar look_back_period: The number of days of usage to look back for + recommendation. + :vartype look_back_period: str + :ivar instance_flexibility_ratio: The instance Flexibility Ratio. + :vartype instance_flexibility_ratio: int + :ivar instance_flexibility_group: The instance Flexibility Group. + :vartype instance_flexibility_group: str + :ivar normalized_size: The normalized Size. + :vartype normalized_size: str + :ivar recommended_quantity_normalized: The recommended Quantity + Normalized. + :vartype recommended_quantity_normalized: float + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar term: RI recommendations in one or three year terms. + :vartype term: str + :ivar cost_with_no_reserved_instances: The total amount of cost without + reserved instances. + :vartype cost_with_no_reserved_instances: decimal.Decimal + :ivar recommended_quantity: Recommended quality for reserved instances. + :vartype recommended_quantity: decimal.Decimal + :ivar total_cost_with_reserved_instances: The total amount of cost with + reserved instances. + :vartype total_cost_with_reserved_instances: decimal.Decimal + :ivar net_savings: Total estimated savings with reserved instances. + :vartype net_savings: decimal.Decimal + :ivar first_usage_date: The usage date for looking back. + :vartype first_usage_date: datetime + :ivar scope: Shared or single recommendation. + :vartype scope: str + :ivar sku_properties: List of sku properties + :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'kind': {'required': True}, + 'look_back_period': {'readonly': True}, + 'instance_flexibility_ratio': {'readonly': True}, + 'instance_flexibility_group': {'readonly': True}, + 'normalized_size': {'readonly': True}, + 'recommended_quantity_normalized': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'term': {'readonly': True}, + 'cost_with_no_reserved_instances': {'readonly': True}, + 'recommended_quantity': {'readonly': True}, + 'total_cost_with_reserved_instances': {'readonly': True}, + 'net_savings': {'readonly': True}, + 'first_usage_date': {'readonly': True}, + 'scope': {'readonly': True}, + 'sku_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, + 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, + 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, + 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, + 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, + 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'sku_properties': {'key': 'properties.skuProperties', 'type': '[SkuProperty]'}, + } + + def __init__(self, **kwargs): + super(LegacyReservationRecommendation, self).__init__(**kwargs) + self.look_back_period = None + self.instance_flexibility_ratio = None + self.instance_flexibility_group = None + self.normalized_size = None + self.recommended_quantity_normalized = None + self.meter_id = None + self.term = None + self.cost_with_no_reserved_instances = None + self.recommended_quantity = None + self.total_cost_with_reserved_instances = None + self.net_savings = None + self.first_usage_date = None + self.scope = None + self.sku_properties = None + self.kind = 'legacy' + + +class UsageDetail(Resource): + """An usage detail resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LegacyUsageDetail, ModernUsageDetail + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'legacy': 'LegacyUsageDetail', 'modern': 'ModernUsageDetail'} + } + + def __init__(self, **kwargs): + super(UsageDetail, self).__init__(**kwargs) + self.kind = None + self.kind = 'UsageDetail' + + +class LegacyUsageDetail(UsageDetail): + """Legacy usage detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_account_id: Billing Account identifier. + :vartype billing_account_id: str + :ivar billing_account_name: Billing Account Name. + :vartype billing_account_name: str + :ivar billing_period_start_date: The billing period start date. + :vartype billing_period_start_date: datetime + :ivar billing_period_end_date: The billing period end date. + :vartype billing_period_end_date: datetime + :ivar billing_profile_id: Billing Profile identifier. + :vartype billing_profile_id: str + :ivar billing_profile_name: Billing Profile Name. + :vartype billing_profile_name: str + :ivar account_owner_id: Account Owner Id. + :vartype account_owner_id: str + :ivar account_name: Account Name. + :vartype account_name: str + :ivar subscription_id: Subscription guid. + :vartype subscription_id: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar date_property: Date for the usage record. + :vartype date_property: datetime + :ivar product: Product name for the consumed service or purchase. Not + available for Marketplace. + :vartype product: str + :ivar part_number: Part Number of the service used. Can be used to join + with the price sheet. Not available for marketplace. + :vartype part_number: str + :ivar meter_id: The meter id (GUID). Not available for marketplace. For + reserved instance this represents the primary meter for which the + reservation was purchased. For the actual VM Size for which the + reservation is purchased see productOrderName. + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: + ~azure.mgmt.consumption.models.MeterDetailsResponse + :ivar quantity: The usage quantity. + :vartype quantity: decimal.Decimal + :ivar effective_price: Effective Price that's charged for the usage. + :vartype effective_price: decimal.Decimal + :ivar cost: The amount of cost before tax. + :vartype cost: decimal.Decimal + :ivar unit_price: Unit Price is the price applicable to you. (your EA or + other contract price). + :vartype unit_price: decimal.Decimal + :ivar billing_currency: Billing Currency. + :vartype billing_currency: str + :ivar resource_location: Resource Location. + :vartype resource_location: str + :ivar consumed_service: Consumed service name. Name of the azure resource + provider that emits the usage or was purchased. This value is not provided + for marketplace usage. + :vartype consumed_service: str + :ivar resource_id: Azure resource manager resource identifier. + :vartype resource_id: str + :ivar resource_name: Resource Name. + :vartype resource_name: str + :ivar service_info1: Service Info 1. + :vartype service_info1: str + :ivar service_info2: Service Info 2. + :vartype service_info2: str + :ivar additional_info: Additional details of this usage item. By default + this is not populated, unless it's specified in $expand. Use this field to + get usage line item specific details such as the actual VM Size + (ServiceType) or the ratio in which the reservation discount is applied. + :vartype additional_info: str + :ivar invoice_section: Invoice Section Name. + :vartype invoice_section: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar resource_group: Resource Group Name. + :vartype resource_group: str + :ivar reservation_id: ARM resource id of the reservation. Only applies to + records relevant to reservations. + :vartype reservation_id: str + :ivar reservation_name: User provided display name of the reservation. + Last known name for a particular day is populated in the daily data. Only + applies to records relevant to reservations. + :vartype reservation_name: str + :ivar product_order_id: Product Order Id. For reservations this is the + Reservation Order ID. + :vartype product_order_id: str + :ivar product_order_name: Product Order Name. For reservations this is the + SKU that was purchased. + :vartype product_order_name: str + :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. + :vartype offer_id: str + :ivar is_azure_credit_eligible: Is Azure Credit Eligible. + :vartype is_azure_credit_eligible: bool + :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 + months for a 1 year reservation. 36 months for a 3 year reservation. + :vartype term: str + :ivar publisher_name: Publisher Name. + :vartype publisher_name: str + :ivar publisher_type: Publisher Type. + :vartype publisher_type: str + :ivar plan_name: Plan Name. + :vartype plan_name: str + :ivar charge_type: Indicates a charge represents credits, usage, a + Marketplace purchase, a reservation fee, or a refund. + :vartype charge_type: str + :ivar frequency: Indicates how frequently this charge will occur. OneTime + for purchases which only happen once, Monthly for fees which recur every + month, and UsageBased for charges based on how much a service is used. + :vartype frequency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_account_id': {'readonly': True}, + 'billing_account_name': {'readonly': True}, + 'billing_period_start_date': {'readonly': True}, + 'billing_period_end_date': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'billing_profile_name': {'readonly': True}, + 'account_owner_id': {'readonly': True}, + 'account_name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'date_property': {'readonly': True}, + 'product': {'readonly': True}, + 'part_number': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'quantity': {'readonly': True}, + 'effective_price': {'readonly': True}, + 'cost': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'billing_currency': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'service_info1': {'readonly': True}, + 'service_info2': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'invoice_section': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'reservation_name': {'readonly': True}, + 'product_order_id': {'readonly': True}, + 'product_order_name': {'readonly': True}, + 'offer_id': {'readonly': True}, + 'is_azure_credit_eligible': {'readonly': True}, + 'term': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'publisher_type': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'charge_type': {'readonly': True}, + 'frequency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, + 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, + 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, + 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, + 'cost': {'key': 'properties.cost', 'type': 'decimal'}, + 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, + 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, + 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, + 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, + 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, + 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, + 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LegacyUsageDetail, self).__init__(**kwargs) + self.billing_account_id = None + self.billing_account_name = None + self.billing_period_start_date = None + self.billing_period_end_date = None + self.billing_profile_id = None + self.billing_profile_name = None + self.account_owner_id = None + self.account_name = None + self.subscription_id = None + self.subscription_name = None + self.date_property = None + self.product = None + self.part_number = None + self.meter_id = None + self.meter_details = None + self.quantity = None + self.effective_price = None + self.cost = None + self.unit_price = None + self.billing_currency = None + self.resource_location = None + self.consumed_service = None + self.resource_id = None + self.resource_name = None + self.service_info1 = None + self.service_info2 = None + self.additional_info = None + self.invoice_section = None + self.cost_center = None + self.resource_group = None + self.reservation_id = None + self.reservation_name = None + self.product_order_id = None + self.product_order_name = None + self.offer_id = None + self.is_azure_credit_eligible = None + self.term = None + self.publisher_name = None + self.publisher_type = None + self.plan_name = None + self.charge_type = None + self.frequency = None + self.kind = 'legacy' + + +class LotSummary(Resource): + """A lot summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar original_amount: Original amount. + :vartype original_amount: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :ivar source: Lot source. Possible values include: 'PurchasedCredit', + 'PromotionalCredit' + :vartype source: str or ~azure.mgmt.consumption.models.LotSource + :ivar start_date: Start date. + :vartype start_date: datetime + :ivar expiration_date: Expiration date. + :vartype expiration_date: datetime + :ivar po_number: PO number. + :vartype po_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'original_amount': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'source': {'readonly': True}, + 'start_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'po_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'original_amount': {'key': 'properties.originalAmount', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'po_number': {'key': 'properties.poNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LotSummary, self).__init__(**kwargs) + self.original_amount = None + self.closed_balance = None + self.source = None + self.start_date = None + self.expiration_date = None + self.po_number = None + + +class ManagementGroupAggregatedCostResult(Resource): + """A management group aggregated cost resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + aggregated cost belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by aggregated + cost. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the aggregated + cost. + :vartype usage_end: datetime + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed Separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param children: Children of a management group + :type children: + list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] + :param included_subscriptions: List of subscription Guids included in the + calculation of aggregated cost + :type included_subscriptions: list[str] + :param excluded_subscriptions: List of subscription Guids excluded from + the calculation of aggregated cost + :type excluded_subscriptions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, + 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, + 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.marketplace_charges = None + self.charges_billed_separately = None + self.currency = None + self.children = kwargs.get('children', None) + self.included_subscriptions = kwargs.get('included_subscriptions', None) + self.excluded_subscriptions = kwargs.get('excluded_subscriptions', None) + + +class Marketplace(Resource): + """An marketplace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by the usage + detail. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the usage + detail. + :vartype usage_end: datetime + :ivar resource_rate: The marketplace resource rate. + :vartype resource_rate: decimal.Decimal + :ivar offer_name: The type of offer. + :vartype offer_name: str + :ivar resource_group: The name of resource group. + :vartype resource_group: str + :ivar order_number: The order number. + :vartype order_number: str + :ivar instance_name: The name of the resource instance that the usage is + about. + :vartype instance_name: str + :ivar instance_id: The uri of the resource instance that the usage is + about. + :vartype instance_id: str + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar consumed_quantity: The quantity of usage. + :vartype consumed_quantity: decimal.Decimal + :ivar unit_of_measure: The unit of measure. + :vartype unit_of_measure: str + :ivar pretax_cost: The amount of cost before tax. + :vartype pretax_cost: decimal.Decimal + :ivar is_estimated: The estimated usage is subject to change. + :vartype is_estimated: bool + :ivar meter_id: The meter id (GUID). + :vartype meter_id: str + :ivar subscription_guid: Subscription guid. + :vartype subscription_guid: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar account_name: Account name. + :vartype account_name: str + :ivar department_name: Department name. + :vartype department_name: str + :ivar consumed_service: Consumed service name. + :vartype consumed_service: str + :ivar cost_center: The cost center of this department if it is a + department and a costcenter exists + :vartype cost_center: str + :ivar additional_properties: Additional details of this usage item. By + default this is not populated, unless it's specified in $expand. + :vartype additional_properties: str + :ivar publisher_name: The name of publisher. + :vartype publisher_name: str + :ivar plan_name: The name of plan. + :vartype plan_name: str + :ivar is_recurring_charge: Flag indicating whether this is a recurring + charge or not. + :vartype is_recurring_charge: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'resource_rate': {'readonly': True}, + 'offer_name': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'order_number': {'readonly': True}, + 'instance_name': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'currency': {'readonly': True}, + 'consumed_quantity': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'pretax_cost': {'readonly': True}, + 'is_estimated': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'subscription_guid': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'account_name': {'readonly': True}, + 'department_name': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'additional_properties': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'is_recurring_charge': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, + 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, + 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, + 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, + 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, + 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Marketplace, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.resource_rate = None + self.offer_name = None + self.resource_group = None + self.order_number = None + self.instance_name = None + self.instance_id = None + self.currency = None + self.consumed_quantity = None + self.unit_of_measure = None + self.pretax_cost = None + self.is_estimated = None + self.meter_id = None + self.subscription_guid = None + self.subscription_name = None + self.account_name = None + self.department_name = None + self.consumed_service = None + self.cost_center = None + self.additional_properties = None + self.publisher_name = None + self.plan_name = None + self.is_recurring_charge = None + + +class MeterDetails(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit: The unit in which the meter consumption is charged, for + example, 'Hours', 'GB', etc. + :vartype unit: str + :ivar meter_location: The location in which the Azure service is + available. + :vartype meter_location: str + :ivar total_included_quantity: The total included quantity associated with + the offer. + :vartype total_included_quantity: decimal.Decimal + :ivar pretax_standard_rate: The pretax listing price. + :vartype pretax_standard_rate: decimal.Decimal + :ivar service_name: The name of the service. + :vartype service_name: str + :ivar service_tier: The service tier. + :vartype service_tier: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit': {'readonly': True}, + 'meter_location': {'readonly': True}, + 'total_included_quantity': {'readonly': True}, + 'pretax_standard_rate': {'readonly': True}, + 'service_name': {'readonly': True}, + 'service_tier': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'meter_location': {'key': 'meterLocation', 'type': 'str'}, + 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, + 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_tier': {'key': 'serviceTier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MeterDetails, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit = None + self.meter_location = None + self.total_included_quantity = None + self.pretax_standard_rate = None + self.service_name = None + self.service_tier = None + + +class MeterDetailsResponse(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit_of_measure: The unit in which the meter consumption is charged, + for example, 'Hours', 'GB', etc. + :vartype unit_of_measure: str + :ivar service_family: The service family. + :vartype service_family: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'service_family': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'service_family': {'key': 'serviceFamily', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MeterDetailsResponse, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit_of_measure = None + self.service_family = None + + +class ModernChargeSummary(ChargeSummary): + """Modern charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_period_id: The id of the billing period resource that the + charge belongs to. + :vartype billing_period_id: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: Billing Account Id + :vartype billing_account_id: str + :ivar billing_profile_id: Billing Profile Id + :vartype billing_profile_id: str + :ivar invoice_section_id: Invoice Section Id + :vartype invoice_section_id: str + :ivar customer_id: Customer Id + :vartype customer_id: str + :ivar is_invoiced: Is charge Invoiced + :vartype is_invoiced: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'is_invoiced': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'is_invoiced': {'key': 'properties.isInvoiced', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ModernChargeSummary, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None + self.customer_id = None + self.is_invoiced = None + self.kind = 'modern' + + +class ModernReservationRecommendation(ReservationRecommendation): + """Modern reservation recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar look_back_period: The number of days of usage to look back for + recommendation. + :vartype look_back_period: str + :ivar instance_flexibility_ratio: The instance Flexibility Ratio. + :vartype instance_flexibility_ratio: int + :ivar instance_flexibility_group: The instance Flexibility Group. + :vartype instance_flexibility_group: str + :ivar normalized_size: The normalized Size. + :vartype normalized_size: str + :ivar recommended_quantity_normalized: The recommended Quantity + Normalized. + :vartype recommended_quantity_normalized: float + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar term: RI recommendations in one or three year terms. + :vartype term: str + :ivar cost_with_no_reserved_instances: The total amount of cost without + reserved instances. + :vartype cost_with_no_reserved_instances: + ~azure.mgmt.consumption.models.Amount + :ivar recommended_quantity: Recommended quality for reserved instances. + :vartype recommended_quantity: decimal.Decimal + :ivar total_cost_with_reserved_instances: The total amount of cost with + reserved instances. + :vartype total_cost_with_reserved_instances: + ~azure.mgmt.consumption.models.Amount + :ivar net_savings: Total estimated savings with reserved instances. + :vartype net_savings: ~azure.mgmt.consumption.models.Amount + :ivar first_usage_date: The usage date for looking back. + :vartype first_usage_date: datetime + :ivar scope: Shared or single recommendation. + :vartype scope: str + :ivar sku_properties: List of sku properties + :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'kind': {'required': True}, + 'look_back_period': {'readonly': True}, + 'instance_flexibility_ratio': {'readonly': True}, + 'instance_flexibility_group': {'readonly': True}, + 'normalized_size': {'readonly': True}, + 'recommended_quantity_normalized': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'term': {'readonly': True}, + 'cost_with_no_reserved_instances': {'readonly': True}, + 'recommended_quantity': {'readonly': True}, + 'total_cost_with_reserved_instances': {'readonly': True}, + 'net_savings': {'readonly': True}, + 'first_usage_date': {'readonly': True}, + 'scope': {'readonly': True}, + 'sku_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, + 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, + 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'Amount'}, + 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, + 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'Amount'}, + 'net_savings': {'key': 'properties.netSavings', 'type': 'Amount'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'sku_properties': {'key': 'properties.skuProperties', 'type': '[SkuProperty]'}, + } + + def __init__(self, **kwargs): + super(ModernReservationRecommendation, self).__init__(**kwargs) + self.look_back_period = None + self.instance_flexibility_ratio = None + self.instance_flexibility_group = None + self.normalized_size = None + self.recommended_quantity_normalized = None + self.meter_id = None + self.term = None + self.cost_with_no_reserved_instances = None + self.recommended_quantity = None + self.total_cost_with_reserved_instances = None + self.net_savings = None + self.first_usage_date = None + self.scope = None + self.sku_properties = None + self.kind = 'modern' + + +class ModernUsageDetail(UsageDetail): + """Modern usage detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_account_id: Billing Account identifier. + :vartype billing_account_id: str + :ivar billing_account_name: Name of the Billing Account. + :vartype billing_account_name: str + :ivar billing_period_start_date: Billing Period Start Date as in the + invoice. + :vartype billing_period_start_date: datetime + :ivar billing_period_end_date: Billing Period End Date as in the invoice. + :vartype billing_period_end_date: datetime + :ivar billing_profile_id: Identifier for the billing profile that groups + costs across invoices in the a singular billing currency across across the + customers who have onboarded the Microsoft customer agreement and the + customers in CSP who have made entitlement purchases like SaaS, + Marketplace, RI, etc. + :vartype billing_profile_id: str + :ivar billing_profile_name: Name of the billing profile that groups costs + across invoices in the a singular billing currency across across the + customers who have onboarded the Microsoft customer agreement and the + customers in CSP who have made entitlement purchases like SaaS, + Marketplace, RI, etc. + :vartype billing_profile_name: str + :ivar subscription_guid: Unique Microsoft generated identifier for the + Azure Subscription. + :vartype subscription_guid: str + :ivar subscription_name: Name of the Azure Subscription. + :vartype subscription_name: str + :ivar date_property: Date for the usage record. + :vartype date_property: datetime + :ivar product: Name of the product that has accrued charges by consumption + or purchase as listed in the invoice. Not available for Marketplace. + :vartype product: str + :ivar meter_id: The meter id (GUID). Not available for marketplace. For + reserved instance this represents the primary meter for which the + reservation was purchased. For the actual VM Size for which the + reservation is purchased see productOrderName. + :vartype meter_id: str + :ivar meter_name: Identifies the name of the meter against which + consumption is measured. + :vartype meter_name: str + :ivar meter_region: Identifies the location of the datacenter for certain + services that are priced based on datacenter location. + :vartype meter_region: str + :ivar meter_category: Identifies the top-level service for the usage. + :vartype meter_category: str + :ivar meter_sub_category: Defines the type or sub-category of Azure + service that can affect the rate. + :vartype meter_sub_category: str + :ivar service_family: List the service family for the product purchased or + charged (Example: Storage ; Compute). + :vartype service_family: str + :ivar quantity: Measure the quantity purchased or consumed.The amount of + the meter used during the billing period. + :vartype quantity: decimal.Decimal + :ivar unit_of_measure: Identifies the Unit that the service is charged in. + For example, GB, hours, 10,000 s. + :vartype unit_of_measure: str + :ivar instance_name: Instance Name. + :vartype instance_name: str + :ivar cost_in_usd: Estimated extendedCost or blended cost before tax in + USD. + :vartype cost_in_usd: decimal.Decimal + :ivar unit_price: Unit Price is the price applicable to you. (your EA or + other contract price). + :vartype unit_price: decimal.Decimal + :ivar billing_currency_code: The currency defining the billed cost. + :vartype billing_currency_code: str + :ivar resource_location: Name of the resource location. + :vartype resource_location: str + :ivar consumed_service: Consumed service name. Name of the azure resource + provider that emits the usage or was purchased. This value is not provided + for marketplace usage. + :vartype consumed_service: str + :ivar service_info1: Service Info 1. + :vartype service_info1: str + :ivar service_info2: Service Info 2. + :vartype service_info2: str + :ivar additional_info: Additional details of this usage item. Use this + field to get usage line item specific details such as the actual VM Size + (ServiceType) or the ratio in which the reservation discount is applied. + :vartype additional_info: str + :ivar invoice_section_id: Identifier of the project that is being charged + in the invoice. Not applicable for Microsoft Customer Agreements onboarded + by partners. + :vartype invoice_section_id: str + :ivar invoice_section_name: Name of the project that is being charged in + the invoice. Not applicable for Microsoft Customer Agreements onboarded by + partners. + :vartype invoice_section_name: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar resource_group: Name of the Azure resource group used for cohesive + lifecycle management of resources. + :vartype resource_group: str + :ivar reservation_id: ARM resource id of the reservation. Only applies to + records relevant to reservations. + :vartype reservation_id: str + :ivar reservation_name: User provided display name of the reservation. + Last known name for a particular day is populated in the daily data. Only + applies to records relevant to reservations. + :vartype reservation_name: str + :ivar product_order_id: The identifier for the asset or Azure plan name + that the subscription belongs to. For example: Azure Plan. For + reservations this is the Reservation Order ID. + :vartype product_order_id: str + :ivar product_order_name: Product Order Name. For reservations this is the + SKU that was purchased. + :vartype product_order_name: str + :ivar is_azure_credit_eligible: Determines if the cost is eligible to be + paid for using Azure credits. + :vartype is_azure_credit_eligible: bool + :ivar term: Term (in months). Displays the term for the validity of the + offer. For example. In case of reserved instances it displays 12 months + for yearly term of reserved instance. For one time purchases or recurring + purchases, the terms displays 1 month; This is not applicable for Azure + consumption. + :vartype term: str + :ivar publisher_name: Name of the publisher of the service including + Microsoft or Third Party publishers. + :vartype publisher_name: str + :ivar publisher_type: Type of publisher that identifies if the publisher + is first party, third party reseller or third party agency. + :vartype publisher_type: str + :ivar charge_type: Indicates a charge represents credits, usage, a + Marketplace purchase, a reservation fee, or a refund. + :vartype charge_type: str + :ivar frequency: Indicates how frequently this charge will occur. OneTime + for purchases which only happen once, Monthly for fees which recur every + month, and UsageBased for charges based on how much a service is used. + :vartype frequency: str + :ivar cost_in_billing_currency: ExtendedCost or blended cost before tax in + billed currency. + :vartype cost_in_billing_currency: decimal.Decimal + :ivar cost_in_pricing_currency: ExtendedCost or blended cost before tax in + pricing currency to correlate with prices. + :vartype cost_in_pricing_currency: decimal.Decimal + :ivar exchange_rate: Exchange rate used in conversion from pricing + currency to billing currency. + :vartype exchange_rate: str + :ivar exchange_rate_date: Date on which exchange rate used in conversion + from pricing currency to billing currency. + :vartype exchange_rate_date: datetime + :ivar invoice_id: Invoice ID as on the invoice where the specific + transaction appears. + :vartype invoice_id: str + :ivar previous_invoice_id: Reference to an original invoice there is a + refund (negative cost). This is populated only when there is a refund. + :vartype previous_invoice_id: str + :ivar pricing_currency_code: Pricing Billing Currency. + :vartype pricing_currency_code: str + :ivar product_identifier: Identifer for the product that has accrued + charges by consumption or purchase . This is the concatenated key of + productId and SKuId in partner center. + :vartype product_identifier: str + :ivar resource_location_normalized: Resource Location Normalized. + :vartype resource_location_normalized: str + :ivar service_period_start_date: Start date for the rating period when the + service usage was rated for charges. The prices for Azure services are + determined for the rating period. + :vartype service_period_start_date: datetime + :ivar service_period_end_date: End date for the period when the service + usage was rated for charges. The prices for Azure services are determined + based on the rating period. + :vartype service_period_end_date: datetime + :ivar customer_tenant_id: Identifier of the customer's AAD tenant. + :vartype customer_tenant_id: str + :ivar customer_name: Name of the customer's AAD tenant. + :vartype customer_name: str + :ivar partner_tenant_id: Identifier for the partner's AAD tenant. + :vartype partner_tenant_id: str + :ivar partner_name: Name of the partner' AAD tenant. + :vartype partner_name: str + :ivar reseller_mpn_id: MPNId for the reseller associated with the + subscription. + :vartype reseller_mpn_id: str + :ivar reseller_name: Reseller Name. + :vartype reseller_name: str + :ivar publisher_id: Publisher Id. + :vartype publisher_id: str + :ivar market_price: Market Price that's charged for the usage. + :vartype market_price: decimal.Decimal + :ivar exchange_rate_pricing_to_billing: Exchange Rate from pricing + currency to billing currency. + :vartype exchange_rate_pricing_to_billing: decimal.Decimal + :ivar payg_cost_in_billing_currency: The amount of PayG cost before tax in + billing currency. + :vartype payg_cost_in_billing_currency: decimal.Decimal + :ivar payg_cost_in_usd: The amount of PayG cost before tax in US Dollar + currency. + :vartype payg_cost_in_usd: decimal.Decimal + :ivar partner_earned_credit_rate: Rate of discount applied if there is a + partner earned credit (PEC) based on partner admin link access. + :vartype partner_earned_credit_rate: decimal.Decimal + :ivar partner_earned_credit_applied: Flag to indicate if partner earned + credit has been applied or not. + :vartype partner_earned_credit_applied: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_account_id': {'readonly': True}, + 'billing_account_name': {'readonly': True}, + 'billing_period_start_date': {'readonly': True}, + 'billing_period_end_date': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'billing_profile_name': {'readonly': True}, + 'subscription_guid': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'date_property': {'readonly': True}, + 'product': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_name': {'readonly': True}, + 'meter_region': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'service_family': {'readonly': True}, + 'quantity': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'instance_name': {'readonly': True}, + 'cost_in_usd': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'billing_currency_code': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'service_info1': {'readonly': True}, + 'service_info2': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, + 'invoice_section_name': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'reservation_name': {'readonly': True}, + 'product_order_id': {'readonly': True}, + 'product_order_name': {'readonly': True}, + 'is_azure_credit_eligible': {'readonly': True}, + 'term': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'publisher_type': {'readonly': True}, + 'charge_type': {'readonly': True}, + 'frequency': {'readonly': True}, + 'cost_in_billing_currency': {'readonly': True}, + 'cost_in_pricing_currency': {'readonly': True}, + 'exchange_rate': {'readonly': True}, + 'exchange_rate_date': {'readonly': True}, + 'invoice_id': {'readonly': True}, + 'previous_invoice_id': {'readonly': True}, + 'pricing_currency_code': {'readonly': True}, + 'product_identifier': {'readonly': True}, + 'resource_location_normalized': {'readonly': True}, + 'service_period_start_date': {'readonly': True}, + 'service_period_end_date': {'readonly': True}, + 'customer_tenant_id': {'readonly': True}, + 'customer_name': {'readonly': True}, + 'partner_tenant_id': {'readonly': True}, + 'partner_name': {'readonly': True}, + 'reseller_mpn_id': {'readonly': True}, + 'reseller_name': {'readonly': True}, + 'publisher_id': {'readonly': True}, + 'market_price': {'readonly': True}, + 'exchange_rate_pricing_to_billing': {'readonly': True}, + 'payg_cost_in_billing_currency': {'readonly': True}, + 'payg_cost_in_usd': {'readonly': True}, + 'partner_earned_credit_rate': {'readonly': True}, + 'partner_earned_credit_applied': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, + 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, + 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, + 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'meter_name': {'key': 'properties.meterName', 'type': 'str'}, + 'meter_region': {'key': 'properties.meterRegion', 'type': 'str'}, + 'meter_category': {'key': 'properties.meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'properties.meterSubCategory', 'type': 'str'}, + 'service_family': {'key': 'properties.serviceFamily', 'type': 'str'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, + 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, + 'cost_in_usd': {'key': 'properties.costInUSD', 'type': 'decimal'}, + 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, + 'billing_currency_code': {'key': 'properties.billingCurrencyCode', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, + 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, + 'invoice_section_name': {'key': 'properties.invoiceSectionName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, + 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, + 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, + 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + 'cost_in_billing_currency': {'key': 'properties.costInBillingCurrency', 'type': 'decimal'}, + 'cost_in_pricing_currency': {'key': 'properties.costInPricingCurrency', 'type': 'decimal'}, + 'exchange_rate': {'key': 'properties.exchangeRate', 'type': 'str'}, + 'exchange_rate_date': {'key': 'properties.exchangeRateDate', 'type': 'iso-8601'}, + 'invoice_id': {'key': 'properties.invoiceId', 'type': 'str'}, + 'previous_invoice_id': {'key': 'properties.previousInvoiceId', 'type': 'str'}, + 'pricing_currency_code': {'key': 'properties.pricingCurrencyCode', 'type': 'str'}, + 'product_identifier': {'key': 'properties.productIdentifier', 'type': 'str'}, + 'resource_location_normalized': {'key': 'properties.resourceLocationNormalized', 'type': 'str'}, + 'service_period_start_date': {'key': 'properties.servicePeriodStartDate', 'type': 'iso-8601'}, + 'service_period_end_date': {'key': 'properties.servicePeriodEndDate', 'type': 'iso-8601'}, + 'customer_tenant_id': {'key': 'properties.customerTenantId', 'type': 'str'}, + 'customer_name': {'key': 'properties.customerName', 'type': 'str'}, + 'partner_tenant_id': {'key': 'properties.partnerTenantId', 'type': 'str'}, + 'partner_name': {'key': 'properties.partnerName', 'type': 'str'}, + 'reseller_mpn_id': {'key': 'properties.resellerMpnId', 'type': 'str'}, + 'reseller_name': {'key': 'properties.resellerName', 'type': 'str'}, + 'publisher_id': {'key': 'properties.publisherId', 'type': 'str'}, + 'market_price': {'key': 'properties.marketPrice', 'type': 'decimal'}, + 'exchange_rate_pricing_to_billing': {'key': 'properties.exchangeRatePricingToBilling', 'type': 'decimal'}, + 'payg_cost_in_billing_currency': {'key': 'properties.paygCostInBillingCurrency', 'type': 'decimal'}, + 'payg_cost_in_usd': {'key': 'properties.paygCostInUSD', 'type': 'decimal'}, + 'partner_earned_credit_rate': {'key': 'properties.partnerEarnedCreditRate', 'type': 'decimal'}, + 'partner_earned_credit_applied': {'key': 'properties.partnerEarnedCreditApplied', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModernUsageDetail, self).__init__(**kwargs) + self.billing_account_id = None + self.billing_account_name = None + self.billing_period_start_date = None + self.billing_period_end_date = None + self.billing_profile_id = None + self.billing_profile_name = None + self.subscription_guid = None + self.subscription_name = None + self.date_property = None + self.product = None + self.meter_id = None + self.meter_name = None + self.meter_region = None + self.meter_category = None + self.meter_sub_category = None + self.service_family = None + self.quantity = None + self.unit_of_measure = None + self.instance_name = None + self.cost_in_usd = None + self.unit_price = None + self.billing_currency_code = None + self.resource_location = None + self.consumed_service = None + self.service_info1 = None + self.service_info2 = None + self.additional_info = None + self.invoice_section_id = None + self.invoice_section_name = None + self.cost_center = None + self.resource_group = None + self.reservation_id = None + self.reservation_name = None + self.product_order_id = None + self.product_order_name = None + self.is_azure_credit_eligible = None + self.term = None + self.publisher_name = None + self.publisher_type = None + self.charge_type = None + self.frequency = None + self.cost_in_billing_currency = None + self.cost_in_pricing_currency = None + self.exchange_rate = None + self.exchange_rate_date = None + self.invoice_id = None + self.previous_invoice_id = None + self.pricing_currency_code = None + self.product_identifier = None + self.resource_location_normalized = None + self.service_period_start_date = None + self.service_period_end_date = None + self.customer_tenant_id = None + self.customer_name = None + self.partner_tenant_id = None + self.partner_name = None + self.reseller_mpn_id = None + self.reseller_name = None + self.publisher_id = None + self.market_price = None + self.exchange_rate_pricing_to_billing = None + self.payg_cost_in_billing_currency = None + self.payg_cost_in_usd = None + self.partner_earned_credit_rate = None + self.partner_earned_credit_applied = None + self.kind = 'modern' + + +class Notification(Model): + """The notification associated with a budget. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. The notification is enabled or not. + :type enabled: bool + :param operator: Required. The comparison operator. Possible values + include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + :type operator: str or ~azure.mgmt.consumption.models.OperatorType + :param threshold: Required. Threshold value associated with a + notification. Notification is sent when the cost exceeded the threshold. + It is always percent and has to be between 0 and 1000. + :type threshold: decimal.Decimal + :param contact_emails: Required. Email addresses to send the budget + notification to when the threshold is exceeded. + :type contact_emails: list[str] + :param contact_roles: Contact roles to send the budget notification to + when the threshold is exceeded. + :type contact_roles: list[str] + :param contact_groups: Action groups to send the budget notification to + when the threshold is exceeded. + :type contact_groups: list[str] + """ + + _validation = { + 'enabled': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, + 'contact_groups': {'max_items': 50, 'min_items': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'decimal'}, + 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, + 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, + 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(Notification, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.contact_emails = kwargs.get('contact_emails', None) + self.contact_roles = kwargs.get('contact_roles', None) + self.contact_groups = kwargs.get('contact_groups', None) + + +class Operation(Model): + """A Consumption REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.consumption.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.Consumption. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: UsageDetail, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class PriceSheetProperties(Model): + """The properties of the price sheet. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails + :ivar unit_of_measure: Unit of measure + :vartype unit_of_measure: str + :ivar included_quantity: Included quality for an offer + :vartype included_quantity: decimal.Decimal + :ivar part_number: Part Number + :vartype part_number: str + :ivar unit_price: Unit Price + :vartype unit_price: decimal.Decimal + :ivar currency_code: Currency Code + :vartype currency_code: str + :ivar offer_id: Offer Id + :vartype offer_id: str + """ + + _validation = { + 'billing_period_id': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'included_quantity': {'readonly': True}, + 'part_number': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'currency_code': {'readonly': True}, + 'offer_id': {'readonly': True}, + } + + _attribute_map = { + 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, + 'part_number': {'key': 'partNumber', 'type': 'str'}, + 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'offer_id': {'key': 'offerId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PriceSheetProperties, self).__init__(**kwargs) + self.billing_period_id = None + self.meter_id = None + self.meter_details = None + self.unit_of_measure = None + self.included_quantity = None + self.part_number = None + self.unit_price = None + self.currency_code = None + self.offer_id = None + + +class PriceSheetResult(Resource): + """An pricesheet resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar pricesheets: Price sheet + :vartype pricesheets: + list[~azure.mgmt.consumption.models.PriceSheetProperties] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'pricesheets': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PriceSheetResult, self).__init__(**kwargs) + self.pricesheets = None + self.next_link = None + + +class ReservationDetail(Resource): + """reservation detail resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar instance_flexibility_ratio: The instance Flexibility Ratio. + :vartype instance_flexibility_ratio: str + :ivar instance_flexibility_group: The instance Flexibility Group. + :vartype instance_flexibility_group: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved for the day. E.g. + if reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days. + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: The date on which consumption occurred. + :vartype usage_date: datetime + :ivar used_hours: This is the total hours used by the instance. + :vartype used_hours: decimal.Decimal + :ivar instance_id: This identifier is the name of the resource or the + fully qualified Resource ID. + :vartype instance_id: str + :ivar total_reserved_quantity: This is the total count of instances that + are reserved for the reservationId. + :vartype total_reserved_quantity: decimal.Decimal + :ivar kind: The reservation kind. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'instance_flexibility_ratio': {'readonly': True}, + 'instance_flexibility_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'total_reserved_quantity': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'str'}, + 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, + 'kind': {'key': 'properties.kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReservationDetail, self).__init__(**kwargs) + self.reservation_order_id = None + self.instance_flexibility_ratio = None + self.instance_flexibility_group = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.instance_id = None + self.total_reserved_quantity = None + self.kind = None + + +class ReservationSummary(Resource): + """reservation summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved. E.g. if + reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: Data corresponding to the utilization record. If the + grain of data is monthly, it will be first day of month. + :vartype usage_date: datetime + :ivar used_hours: Total used hours by the reservation + :vartype used_hours: decimal.Decimal + :ivar min_utilization_percentage: This is the minimum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field + will return 10% for that day + :vartype min_utilization_percentage: decimal.Decimal + :ivar avg_utilization_percentage: This is average utilization for the + entire time range. (day or month depending on the grain) + :vartype avg_utilization_percentage: decimal.Decimal + :ivar max_utilization_percentage: This is the maximum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field + will return 100% for that day. + :vartype max_utilization_percentage: decimal.Decimal + :ivar kind: The reservation kind. + :vartype kind: str + :ivar purchased_quantity: This is the purchased quantity for the + reservationId. + :vartype purchased_quantity: decimal.Decimal + :ivar remaining_quantity: This is the remaining quantity for the + reservationId. + :vartype remaining_quantity: decimal.Decimal + :ivar total_reserved_quantity: This is the total count of instances that + are reserved for the reservationId. + :vartype total_reserved_quantity: decimal.Decimal + :ivar used_quantity: This is the used quantity for the reservationId. + :vartype used_quantity: decimal.Decimal + :ivar utilized_percentage: This is the utilized percentage for the + reservation Id. + :vartype utilized_percentage: decimal.Decimal + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'min_utilization_percentage': {'readonly': True}, + 'avg_utilization_percentage': {'readonly': True}, + 'max_utilization_percentage': {'readonly': True}, + 'kind': {'readonly': True}, + 'purchased_quantity': {'readonly': True}, + 'remaining_quantity': {'readonly': True}, + 'total_reserved_quantity': {'readonly': True}, + 'used_quantity': {'readonly': True}, + 'utilized_percentage': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, + 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, + 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, + 'kind': {'key': 'properties.kind', 'type': 'str'}, + 'purchased_quantity': {'key': 'properties.purchasedQuantity', 'type': 'decimal'}, + 'remaining_quantity': {'key': 'properties.remainingQuantity', 'type': 'decimal'}, + 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, + 'used_quantity': {'key': 'properties.usedQuantity', 'type': 'decimal'}, + 'utilized_percentage': {'key': 'properties.utilizedPercentage', 'type': 'decimal'}, + } + + def __init__(self, **kwargs): + super(ReservationSummary, self).__init__(**kwargs) + self.reservation_order_id = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.min_utilization_percentage = None + self.avg_utilization_percentage = None + self.max_utilization_percentage = None + self.kind = None + self.purchased_quantity = None + self.remaining_quantity = None + self.total_reserved_quantity = None + self.used_quantity = None + self.utilized_percentage = None + + +class ReservationTransaction(Resource): + """Reservation transaction resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar event_date: The date of the transaction + :vartype event_date: datetime + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar description: The description of the transaction. + :vartype description: str + :ivar event_type: The type of the transaction (Purchase, Cancel, etc.) + :vartype event_type: str + :ivar quantity: The quantity of the transaction. + :vartype quantity: decimal.Decimal + :ivar amount: The charge of the transaction. + :vartype amount: decimal.Decimal + :ivar currency: The ISO currency in which the transaction is charged, for + example, USD. + :vartype currency: str + :ivar reservation_order_name: The name of the reservation order. + :vartype reservation_order_name: str + :ivar purchasing_enrollment: The purchasing enrollment. + :vartype purchasing_enrollment: str + :ivar purchasing_subscription_guid: The subscription guid that makes the + transaction. + :vartype purchasing_subscription_guid: str + :ivar purchasing_subscription_name: The subscription name that makes the + transaction. + :vartype purchasing_subscription_name: str + :ivar arm_sku_name: This is the ARM Sku name. It can be used to join with + the serviceType field in additional info in usage records. + :vartype arm_sku_name: str + :ivar term: This is the term of the transaction. + :vartype term: str + :ivar region: The region of the transaction. + :vartype region: str + :ivar account_name: The name of the account that makes the transaction. + :vartype account_name: str + :ivar account_owner_email: The email of the account owner that makes the + transaction. + :vartype account_owner_email: str + :ivar department_name: The department name. + :vartype department_name: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar current_enrollment: The current enrollment. + :vartype current_enrollment: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'event_date': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'description': {'readonly': True}, + 'event_type': {'readonly': True}, + 'quantity': {'readonly': True}, + 'amount': {'readonly': True}, + 'currency': {'readonly': True}, + 'reservation_order_name': {'readonly': True}, + 'purchasing_enrollment': {'readonly': True}, + 'purchasing_subscription_guid': {'readonly': True}, + 'purchasing_subscription_name': {'readonly': True}, + 'arm_sku_name': {'readonly': True}, + 'term': {'readonly': True}, + 'region': {'readonly': True}, + 'account_name': {'readonly': True}, + 'account_owner_email': {'readonly': True}, + 'department_name': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'current_enrollment': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'event_date': {'key': 'properties.eventDate', 'type': 'iso-8601'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'event_type': {'key': 'properties.eventType', 'type': 'str'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'amount': {'key': 'properties.amount', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'reservation_order_name': {'key': 'properties.reservationOrderName', 'type': 'str'}, + 'purchasing_enrollment': {'key': 'properties.purchasingEnrollment', 'type': 'str'}, + 'purchasing_subscription_guid': {'key': 'properties.purchasingSubscriptionGuid', 'type': 'str'}, + 'purchasing_subscription_name': {'key': 'properties.purchasingSubscriptionName', 'type': 'str'}, + 'arm_sku_name': {'key': 'properties.armSkuName', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'region': {'key': 'properties.region', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'account_owner_email': {'key': 'properties.accountOwnerEmail', 'type': 'str'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'current_enrollment': {'key': 'properties.currentEnrollment', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReservationTransaction, self).__init__(**kwargs) + self.event_date = None + self.reservation_order_id = None + self.description = None + self.event_type = None + self.quantity = None + self.amount = None + self.currency = None + self.reservation_order_name = None + self.purchasing_enrollment = None + self.purchasing_subscription_guid = None + self.purchasing_subscription_name = None + self.arm_sku_name = None + self.term = None + self.region = None + self.account_name = None + self.account_owner_email = None + self.department_name = None + self.cost_center = None + self.current_enrollment = None + + +class ResourceAttributes(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + """ + + _validation = { + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceAttributes, self).__init__(**kwargs) + self.location = None + self.sku = None + + +class SkuProperty(Model): + """The Sku property. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of sku property. + :vartype name: str + :ivar value: The value of sku property. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SkuProperty, self).__init__(**kwargs) + self.name = None + self.value = None + + +class Tag(Model): + """The tag resource. + + :param key: Tag key. + :type key: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Tag, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + + +class TagsResult(ProxyResource): + """A resource listing all tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param tags: A list of Tag. + :type tags: list[~azure.mgmt.consumption.models.Tag] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + } + + def __init__(self, **kwargs): + super(TagsResult, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py new file mode 100644 index 000000000000..d968a414876c --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_models_py3.py @@ -0,0 +1,3243 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Amount(Model): + """The amount plus currency . + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar currency: Amount currency. + :vartype currency: str + :ivar value: Amount. + :vartype value: decimal.Decimal + """ + + _validation = { + 'currency': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'currency': {'key': 'currency', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(Amount, self).__init__(**kwargs) + self.currency = None + self.value = None + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + + +class Balance(Resource): + """A balance resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar beginning_balance: The beginning balance for the billing period. + :vartype beginning_balance: decimal.Decimal + :ivar ending_balance: The ending balance for the billing period (for open + periods this will be updated daily). + :vartype ending_balance: decimal.Decimal + :ivar new_purchases: Total new purchase amount. + :vartype new_purchases: decimal.Decimal + :ivar adjustments: Total adjustment amount. + :vartype adjustments: decimal.Decimal + :ivar utilized: Total Commitment usage. + :vartype utilized: decimal.Decimal + :ivar service_overage: Overage for Azure services. + :vartype service_overage: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar total_overage: serviceOverage + chargesBilledSeparately. + :vartype total_overage: decimal.Decimal + :ivar total_usage: Azure service commitment + total Overage. + :vartype total_usage: decimal.Decimal + :ivar azure_marketplace_service_charges: Total charges for Azure + Marketplace. + :vartype azure_marketplace_service_charges: decimal.Decimal + :param billing_frequency: The billing frequency. Possible values include: + 'Month', 'Quarter', 'Year' + :type billing_frequency: str or + ~azure.mgmt.consumption.models.BillingFrequency + :ivar price_hidden: Price is hidden or not. + :vartype price_hidden: bool + :ivar new_purchases_details: List of new purchases. + :vartype new_purchases_details: + list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] + :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit + etc.). + :vartype adjustment_details: + list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'currency': {'readonly': True}, + 'beginning_balance': {'readonly': True}, + 'ending_balance': {'readonly': True}, + 'new_purchases': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'utilized': {'readonly': True}, + 'service_overage': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'total_overage': {'readonly': True}, + 'total_usage': {'readonly': True}, + 'azure_marketplace_service_charges': {'readonly': True}, + 'price_hidden': {'readonly': True}, + 'new_purchases_details': {'readonly': True}, + 'adjustment_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, + 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, + 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, + 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, + 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, + 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, + 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, + 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, + 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, + 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, + 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, + } + + def __init__(self, *, billing_frequency=None, **kwargs) -> None: + super(Balance, self).__init__(**kwargs) + self.currency = None + self.beginning_balance = None + self.ending_balance = None + self.new_purchases = None + self.adjustments = None + self.utilized = None + self.service_overage = None + self.charges_billed_separately = None + self.total_overage = None + self.total_usage = None + self.azure_marketplace_service_charges = None + self.billing_frequency = billing_frequency + self.price_hidden = None + self.new_purchases_details = None + self.adjustment_details = None + + +class BalancePropertiesAdjustmentDetailsItem(Model): + """BalancePropertiesAdjustmentDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new adjustment. + :vartype name: str + :ivar value: the value of new adjustment. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class BalancePropertiesNewPurchasesDetailsItem(Model): + """BalancePropertiesNewPurchasesDetailsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: the name of new purchase. + :vartype name: str + :ivar value: the value of new purchase. + :vartype value: decimal.Decimal + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ProxyResource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, e_tag: str=None, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.e_tag = e_tag + + +class Budget(ProxyResource): + """A budget resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param category: Required. The category of the budget, whether the budget + tracks cost or usage. Possible values include: 'Cost', 'Usage' + :type category: str or ~azure.mgmt.consumption.models.CategoryType + :param amount: Required. The total amount of cost to track with the budget + :type amount: decimal.Decimal + :param time_grain: Required. The time covered by a budget. Tracking of the + amount will be reset based on the time grain. Possible values include: + 'Monthly', 'Quarterly', 'Annually', 'BillingMonth', 'BillingQuarter', + 'BillingAnnual' + :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType + :param time_period: Required. Has start and end date of the budget. The + start date must be first of the month and should be less than the end + date. Budget start date must be on or after June 1, 2017. Future start + date should not be more than three months. Past start date should be + selected within the timegrain period. There are no restrictions on the end + date. + :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod + :param filters: May be used to filter budgets by resource group, resource, + or meter. + :type filters: ~azure.mgmt.consumption.models.Filters + :ivar current_spend: The current amount of cost which is being tracked for + a budget. + :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend + :param notifications: Dictionary of notifications associated with the + budget. Budget can have up to five notifications. + :type notifications: dict[str, + ~azure.mgmt.consumption.models.Notification] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'category': {'required': True}, + 'amount': {'required': True}, + 'time_grain': {'required': True}, + 'time_period': {'required': True}, + 'current_spend': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'amount': {'key': 'properties.amount', 'type': 'decimal'}, + 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, + 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, + 'filters': {'key': 'properties.filters', 'type': 'Filters'}, + 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, + 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, + } + + def __init__(self, *, category, amount, time_grain, time_period, e_tag: str=None, filters=None, notifications=None, **kwargs) -> None: + super(Budget, self).__init__(e_tag=e_tag, **kwargs) + self.category = category + self.amount = amount + self.time_grain = time_grain + self.time_period = time_period + self.filters = filters + self.current_spend = None + self.notifications = notifications + + +class BudgetTimePeriod(Model): + """The start and end date for a budget. + + All required parameters must be populated in order to send to Azure. + + :param start_date: Required. The start date for the budget. + :type start_date: datetime + :param end_date: The end date for the budget. If not provided, we default + this to 10 years from the start date. + :type end_date: datetime + """ + + _validation = { + 'start_date': {'required': True}, + } + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + } + + def __init__(self, *, start_date, end_date=None, **kwargs) -> None: + super(BudgetTimePeriod, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + + +class ChargesListResult(Model): + """Result of listing charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary + :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummary]'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargesListResult, self).__init__(**kwargs) + self.value = None + + +class ChargeSummary(Resource): + """A charge summary resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LegacyChargeSummary, ModernChargeSummary + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'legacy': 'LegacyChargeSummary', 'modern': 'ModernChargeSummary'} + } + + def __init__(self, **kwargs) -> None: + super(ChargeSummary, self).__init__(**kwargs) + self.kind = None + self.kind = 'ChargeSummary' + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CreditBalanceSummary(Model): + """Summary of credit balances. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar estimated_balance: Estimated balance. + :vartype estimated_balance: ~azure.mgmt.consumption.models.Amount + :ivar current_balance: Current balance. + :vartype current_balance: ~azure.mgmt.consumption.models.Amount + """ + + _validation = { + 'estimated_balance': {'readonly': True}, + 'current_balance': {'readonly': True}, + } + + _attribute_map = { + 'estimated_balance': {'key': 'estimatedBalance', 'type': 'Amount'}, + 'current_balance': {'key': 'currentBalance', 'type': 'Amount'}, + } + + def __init__(self, **kwargs) -> None: + super(CreditBalanceSummary, self).__init__(**kwargs) + self.estimated_balance = None + self.current_balance = None + + +class CreditSummary(Resource): + """A credit summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar balance_summary: Summary of balances associated with this credit + summary. + :vartype balance_summary: + ~azure.mgmt.consumption.models.CreditBalanceSummary + :ivar pending_credit_adjustments: Pending credit adjustments. + :vartype pending_credit_adjustments: ~azure.mgmt.consumption.models.Amount + :ivar expired_credit: Expired credit. + :vartype expired_credit: ~azure.mgmt.consumption.models.Amount + :ivar pending_eligible_charges: Pending eligible charges. + :vartype pending_eligible_charges: ~azure.mgmt.consumption.models.Amount + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'balance_summary': {'readonly': True}, + 'pending_credit_adjustments': {'readonly': True}, + 'expired_credit': {'readonly': True}, + 'pending_eligible_charges': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'balance_summary': {'key': 'properties.balanceSummary', 'type': 'CreditBalanceSummary'}, + 'pending_credit_adjustments': {'key': 'properties.pendingCreditAdjustments', 'type': 'Amount'}, + 'expired_credit': {'key': 'properties.expiredCredit', 'type': 'Amount'}, + 'pending_eligible_charges': {'key': 'properties.pendingEligibleCharges', 'type': 'Amount'}, + } + + def __init__(self, **kwargs) -> None: + super(CreditSummary, self).__init__(**kwargs) + self.balance_summary = None + self.pending_credit_adjustments = None + self.expired_credit = None + self.pending_eligible_charges = None + + +class CurrentSpend(Model): + """The current amount of cost which is being tracked for a budget. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar amount: The total amount of cost which is being tracked by the + budget. + :vartype amount: decimal.Decimal + :ivar unit: The unit of measure for the budget amount. + :vartype unit: str + """ + + _validation = { + 'amount': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'amount': {'key': 'amount', 'type': 'decimal'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CurrentSpend, self).__init__(**kwargs) + self.amount = None + self.unit = None + + +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.consumption.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class EventSummary(Resource): + """An event summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar transaction_date: Transaction date. + :vartype transaction_date: datetime + :ivar description: Transaction description. + :vartype description: str + :ivar new_credit: New Credit. + :vartype new_credit: ~azure.mgmt.consumption.models.Amount + :ivar adjustments: Adjustments amount. + :vartype adjustments: ~azure.mgmt.consumption.models.Amount + :ivar credit_expired: Credit expired. + :vartype credit_expired: ~azure.mgmt.consumption.models.Amount + :ivar charges: Charges amount. + :vartype charges: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :param event_type: The type of event. Possible values include: + 'SettledCharges', 'PendingCharges', 'PendingAdjustments', + 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' + :type event_type: str or ~azure.mgmt.consumption.models.EventType + :ivar invoice_number: Invoice number. + :vartype invoice_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'transaction_date': {'readonly': True}, + 'description': {'readonly': True}, + 'new_credit': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'credit_expired': {'readonly': True}, + 'charges': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'invoice_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'transaction_date': {'key': 'properties.transactionDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'new_credit': {'key': 'properties.newCredit', 'type': 'Amount'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'Amount'}, + 'credit_expired': {'key': 'properties.creditExpired', 'type': 'Amount'}, + 'charges': {'key': 'properties.charges', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'event_type': {'key': 'properties.eventType', 'type': 'str'}, + 'invoice_number': {'key': 'properties.invoiceNumber', 'type': 'str'}, + } + + def __init__(self, *, event_type=None, **kwargs) -> None: + super(EventSummary, self).__init__(**kwargs) + self.transaction_date = None + self.description = None + self.new_credit = None + self.adjustments = None + self.credit_expired = None + self.charges = None + self.closed_balance = None + self.event_type = event_type + self.invoice_number = None + + +class Filters(Model): + """May be used to filter budgets by resource group, resource, or meter. + + :param resource_groups: The list of filters on resource groups, allowed at + subscription level only. + :type resource_groups: list[str] + :param resources: The list of filters on resources. + :type resources: list[str] + :param meters: The list of filters on meters (GUID), mandatory for budgets + of usage category. + :type meters: list[str] + :param tags: The dictionary of filters on tags. + :type tags: dict[str, list[str]] + """ + + _validation = { + 'resource_groups': {'max_items': 10, 'min_items': 0}, + 'resources': {'max_items': 10, 'min_items': 0}, + 'meters': {'max_items': 10, 'min_items': 0}, + } + + _attribute_map = { + 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + 'meters': {'key': 'meters', 'type': '[str]'}, + 'tags': {'key': 'tags', 'type': '{[str]}'}, + } + + def __init__(self, *, resource_groups=None, resources=None, meters=None, tags=None, **kwargs) -> None: + super(Filters, self).__init__(**kwargs) + self.resource_groups = resource_groups + self.resources = resources + self.meters = meters + self.tags = tags + + +class Forecast(Resource): + """A forecast resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar usage_date: The usage date of the forecast. + :vartype usage_date: str + :param grain: The granularity of forecast. Possible values include: + 'Daily', 'Monthly', 'Yearly' + :type grain: str or ~azure.mgmt.consumption.models.Grain + :ivar charge: The amount of charge + :vartype charge: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param charge_type: The type of the charge. Could be actual or forecast. + Possible values include: 'Actual', 'Forecast' + :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType + :ivar confidence_levels: The details about the forecast confidence levels. + This is populated only when chargeType is Forecast. + :vartype confidence_levels: + list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'charge': {'readonly': True}, + 'currency': {'readonly': True}, + 'confidence_levels': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, + 'grain': {'key': 'properties.grain', 'type': 'str'}, + 'charge': {'key': 'properties.charge', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, + } + + def __init__(self, *, grain=None, charge_type=None, **kwargs) -> None: + super(Forecast, self).__init__(**kwargs) + self.usage_date = None + self.grain = grain + self.charge = None + self.currency = None + self.charge_type = charge_type + self.confidence_levels = None + + +class ForecastPropertiesConfidenceLevelsItem(Model): + """ForecastPropertiesConfidenceLevelsItem. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar percentage: The percentage level of the confidence + :vartype percentage: decimal.Decimal + :param bound: The boundary of the percentage, values could be 'Upper' or + 'Lower'. Possible values include: 'Upper', 'Lower' + :type bound: str or ~azure.mgmt.consumption.models.Bound + :ivar value: The amount of forecast within the percentage level + :vartype value: decimal.Decimal + """ + + _validation = { + 'percentage': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'decimal'}, + 'bound': {'key': 'bound', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'decimal'}, + } + + def __init__(self, *, bound=None, **kwargs) -> None: + super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) + self.percentage = None + self.bound = bound + self.value = None + + +class LegacyChargeSummary(ChargeSummary): + """Legacy charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_period_id: The id of the billing period resource that the + charge belongs to. + :vartype billing_period_id: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LegacyChargeSummary, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None + self.kind = 'legacy' + + +class ReservationRecommendation(Model): + """A reservation recommendation resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LegacyReservationRecommendation, + ModernReservationRecommendation + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'legacy': 'LegacyReservationRecommendation', 'modern': 'ModernReservationRecommendation'} + } + + def __init__(self, **kwargs) -> None: + super(ReservationRecommendation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + self.location = None + self.sku = None + self.kind = None + + +class LegacyReservationRecommendation(ReservationRecommendation): + """Legacy reservation recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar look_back_period: The number of days of usage to look back for + recommendation. + :vartype look_back_period: str + :ivar instance_flexibility_ratio: The instance Flexibility Ratio. + :vartype instance_flexibility_ratio: int + :ivar instance_flexibility_group: The instance Flexibility Group. + :vartype instance_flexibility_group: str + :ivar normalized_size: The normalized Size. + :vartype normalized_size: str + :ivar recommended_quantity_normalized: The recommended Quantity + Normalized. + :vartype recommended_quantity_normalized: float + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar term: RI recommendations in one or three year terms. + :vartype term: str + :ivar cost_with_no_reserved_instances: The total amount of cost without + reserved instances. + :vartype cost_with_no_reserved_instances: decimal.Decimal + :ivar recommended_quantity: Recommended quality for reserved instances. + :vartype recommended_quantity: decimal.Decimal + :ivar total_cost_with_reserved_instances: The total amount of cost with + reserved instances. + :vartype total_cost_with_reserved_instances: decimal.Decimal + :ivar net_savings: Total estimated savings with reserved instances. + :vartype net_savings: decimal.Decimal + :ivar first_usage_date: The usage date for looking back. + :vartype first_usage_date: datetime + :ivar scope: Shared or single recommendation. + :vartype scope: str + :ivar sku_properties: List of sku properties + :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'kind': {'required': True}, + 'look_back_period': {'readonly': True}, + 'instance_flexibility_ratio': {'readonly': True}, + 'instance_flexibility_group': {'readonly': True}, + 'normalized_size': {'readonly': True}, + 'recommended_quantity_normalized': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'term': {'readonly': True}, + 'cost_with_no_reserved_instances': {'readonly': True}, + 'recommended_quantity': {'readonly': True}, + 'total_cost_with_reserved_instances': {'readonly': True}, + 'net_savings': {'readonly': True}, + 'first_usage_date': {'readonly': True}, + 'scope': {'readonly': True}, + 'sku_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, + 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, + 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, + 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, + 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, + 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'sku_properties': {'key': 'properties.skuProperties', 'type': '[SkuProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(LegacyReservationRecommendation, self).__init__(**kwargs) + self.look_back_period = None + self.instance_flexibility_ratio = None + self.instance_flexibility_group = None + self.normalized_size = None + self.recommended_quantity_normalized = None + self.meter_id = None + self.term = None + self.cost_with_no_reserved_instances = None + self.recommended_quantity = None + self.total_cost_with_reserved_instances = None + self.net_savings = None + self.first_usage_date = None + self.scope = None + self.sku_properties = None + self.kind = 'legacy' + + +class UsageDetail(Resource): + """An usage detail resource. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LegacyUsageDetail, ModernUsageDetail + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'legacy': 'LegacyUsageDetail', 'modern': 'ModernUsageDetail'} + } + + def __init__(self, **kwargs) -> None: + super(UsageDetail, self).__init__(**kwargs) + self.kind = None + self.kind = 'UsageDetail' + + +class LegacyUsageDetail(UsageDetail): + """Legacy usage detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_account_id: Billing Account identifier. + :vartype billing_account_id: str + :ivar billing_account_name: Billing Account Name. + :vartype billing_account_name: str + :ivar billing_period_start_date: The billing period start date. + :vartype billing_period_start_date: datetime + :ivar billing_period_end_date: The billing period end date. + :vartype billing_period_end_date: datetime + :ivar billing_profile_id: Billing Profile identifier. + :vartype billing_profile_id: str + :ivar billing_profile_name: Billing Profile Name. + :vartype billing_profile_name: str + :ivar account_owner_id: Account Owner Id. + :vartype account_owner_id: str + :ivar account_name: Account Name. + :vartype account_name: str + :ivar subscription_id: Subscription guid. + :vartype subscription_id: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar date_property: Date for the usage record. + :vartype date_property: datetime + :ivar product: Product name for the consumed service or purchase. Not + available for Marketplace. + :vartype product: str + :ivar part_number: Part Number of the service used. Can be used to join + with the price sheet. Not available for marketplace. + :vartype part_number: str + :ivar meter_id: The meter id (GUID). Not available for marketplace. For + reserved instance this represents the primary meter for which the + reservation was purchased. For the actual VM Size for which the + reservation is purchased see productOrderName. + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: + ~azure.mgmt.consumption.models.MeterDetailsResponse + :ivar quantity: The usage quantity. + :vartype quantity: decimal.Decimal + :ivar effective_price: Effective Price that's charged for the usage. + :vartype effective_price: decimal.Decimal + :ivar cost: The amount of cost before tax. + :vartype cost: decimal.Decimal + :ivar unit_price: Unit Price is the price applicable to you. (your EA or + other contract price). + :vartype unit_price: decimal.Decimal + :ivar billing_currency: Billing Currency. + :vartype billing_currency: str + :ivar resource_location: Resource Location. + :vartype resource_location: str + :ivar consumed_service: Consumed service name. Name of the azure resource + provider that emits the usage or was purchased. This value is not provided + for marketplace usage. + :vartype consumed_service: str + :ivar resource_id: Azure resource manager resource identifier. + :vartype resource_id: str + :ivar resource_name: Resource Name. + :vartype resource_name: str + :ivar service_info1: Service Info 1. + :vartype service_info1: str + :ivar service_info2: Service Info 2. + :vartype service_info2: str + :ivar additional_info: Additional details of this usage item. By default + this is not populated, unless it's specified in $expand. Use this field to + get usage line item specific details such as the actual VM Size + (ServiceType) or the ratio in which the reservation discount is applied. + :vartype additional_info: str + :ivar invoice_section: Invoice Section Name. + :vartype invoice_section: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar resource_group: Resource Group Name. + :vartype resource_group: str + :ivar reservation_id: ARM resource id of the reservation. Only applies to + records relevant to reservations. + :vartype reservation_id: str + :ivar reservation_name: User provided display name of the reservation. + Last known name for a particular day is populated in the daily data. Only + applies to records relevant to reservations. + :vartype reservation_name: str + :ivar product_order_id: Product Order Id. For reservations this is the + Reservation Order ID. + :vartype product_order_id: str + :ivar product_order_name: Product Order Name. For reservations this is the + SKU that was purchased. + :vartype product_order_name: str + :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. + :vartype offer_id: str + :ivar is_azure_credit_eligible: Is Azure Credit Eligible. + :vartype is_azure_credit_eligible: bool + :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 + months for a 1 year reservation. 36 months for a 3 year reservation. + :vartype term: str + :ivar publisher_name: Publisher Name. + :vartype publisher_name: str + :ivar publisher_type: Publisher Type. + :vartype publisher_type: str + :ivar plan_name: Plan Name. + :vartype plan_name: str + :ivar charge_type: Indicates a charge represents credits, usage, a + Marketplace purchase, a reservation fee, or a refund. + :vartype charge_type: str + :ivar frequency: Indicates how frequently this charge will occur. OneTime + for purchases which only happen once, Monthly for fees which recur every + month, and UsageBased for charges based on how much a service is used. + :vartype frequency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_account_id': {'readonly': True}, + 'billing_account_name': {'readonly': True}, + 'billing_period_start_date': {'readonly': True}, + 'billing_period_end_date': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'billing_profile_name': {'readonly': True}, + 'account_owner_id': {'readonly': True}, + 'account_name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'date_property': {'readonly': True}, + 'product': {'readonly': True}, + 'part_number': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'quantity': {'readonly': True}, + 'effective_price': {'readonly': True}, + 'cost': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'billing_currency': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'service_info1': {'readonly': True}, + 'service_info2': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'invoice_section': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'reservation_name': {'readonly': True}, + 'product_order_id': {'readonly': True}, + 'product_order_name': {'readonly': True}, + 'offer_id': {'readonly': True}, + 'is_azure_credit_eligible': {'readonly': True}, + 'term': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'publisher_type': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'charge_type': {'readonly': True}, + 'frequency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, + 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, + 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, + 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, + 'cost': {'key': 'properties.cost', 'type': 'decimal'}, + 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, + 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, + 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, + 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, + 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, + 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, + 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, + 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LegacyUsageDetail, self).__init__(**kwargs) + self.billing_account_id = None + self.billing_account_name = None + self.billing_period_start_date = None + self.billing_period_end_date = None + self.billing_profile_id = None + self.billing_profile_name = None + self.account_owner_id = None + self.account_name = None + self.subscription_id = None + self.subscription_name = None + self.date_property = None + self.product = None + self.part_number = None + self.meter_id = None + self.meter_details = None + self.quantity = None + self.effective_price = None + self.cost = None + self.unit_price = None + self.billing_currency = None + self.resource_location = None + self.consumed_service = None + self.resource_id = None + self.resource_name = None + self.service_info1 = None + self.service_info2 = None + self.additional_info = None + self.invoice_section = None + self.cost_center = None + self.resource_group = None + self.reservation_id = None + self.reservation_name = None + self.product_order_id = None + self.product_order_name = None + self.offer_id = None + self.is_azure_credit_eligible = None + self.term = None + self.publisher_name = None + self.publisher_type = None + self.plan_name = None + self.charge_type = None + self.frequency = None + self.kind = 'legacy' + + +class LotSummary(Resource): + """A lot summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar original_amount: Original amount. + :vartype original_amount: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :ivar source: Lot source. Possible values include: 'PurchasedCredit', + 'PromotionalCredit' + :vartype source: str or ~azure.mgmt.consumption.models.LotSource + :ivar start_date: Start date. + :vartype start_date: datetime + :ivar expiration_date: Expiration date. + :vartype expiration_date: datetime + :ivar po_number: PO number. + :vartype po_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'original_amount': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'source': {'readonly': True}, + 'start_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'po_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'original_amount': {'key': 'properties.originalAmount', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'po_number': {'key': 'properties.poNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LotSummary, self).__init__(**kwargs) + self.original_amount = None + self.closed_balance = None + self.source = None + self.start_date = None + self.expiration_date = None + self.po_number = None + + +class ManagementGroupAggregatedCostResult(Resource): + """A management group aggregated cost resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + aggregated cost belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by aggregated + cost. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the aggregated + cost. + :vartype usage_end: datetime + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed Separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :param children: Children of a management group + :type children: + list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] + :param included_subscriptions: List of subscription Guids included in the + calculation of aggregated cost + :type included_subscriptions: list[str] + :param excluded_subscriptions: List of subscription Guids excluded from + the calculation of aggregated cost + :type excluded_subscriptions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, + 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, + 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, + } + + def __init__(self, *, children=None, included_subscriptions=None, excluded_subscriptions=None, **kwargs) -> None: + super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.marketplace_charges = None + self.charges_billed_separately = None + self.currency = None + self.children = children + self.included_subscriptions = included_subscriptions + self.excluded_subscriptions = excluded_subscriptions + + +class Marketplace(Resource): + """An marketplace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar usage_start: The start of the date time range covered by the usage + detail. + :vartype usage_start: datetime + :ivar usage_end: The end of the date time range covered by the usage + detail. + :vartype usage_end: datetime + :ivar resource_rate: The marketplace resource rate. + :vartype resource_rate: decimal.Decimal + :ivar offer_name: The type of offer. + :vartype offer_name: str + :ivar resource_group: The name of resource group. + :vartype resource_group: str + :ivar order_number: The order number. + :vartype order_number: str + :ivar instance_name: The name of the resource instance that the usage is + about. + :vartype instance_name: str + :ivar instance_id: The uri of the resource instance that the usage is + about. + :vartype instance_id: str + :ivar currency: The ISO currency in which the meter is charged, for + example, USD. + :vartype currency: str + :ivar consumed_quantity: The quantity of usage. + :vartype consumed_quantity: decimal.Decimal + :ivar unit_of_measure: The unit of measure. + :vartype unit_of_measure: str + :ivar pretax_cost: The amount of cost before tax. + :vartype pretax_cost: decimal.Decimal + :ivar is_estimated: The estimated usage is subject to change. + :vartype is_estimated: bool + :ivar meter_id: The meter id (GUID). + :vartype meter_id: str + :ivar subscription_guid: Subscription guid. + :vartype subscription_guid: str + :ivar subscription_name: Subscription name. + :vartype subscription_name: str + :ivar account_name: Account name. + :vartype account_name: str + :ivar department_name: Department name. + :vartype department_name: str + :ivar consumed_service: Consumed service name. + :vartype consumed_service: str + :ivar cost_center: The cost center of this department if it is a + department and a costcenter exists + :vartype cost_center: str + :ivar additional_properties: Additional details of this usage item. By + default this is not populated, unless it's specified in $expand. + :vartype additional_properties: str + :ivar publisher_name: The name of publisher. + :vartype publisher_name: str + :ivar plan_name: The name of plan. + :vartype plan_name: str + :ivar is_recurring_charge: Flag indicating whether this is a recurring + charge or not. + :vartype is_recurring_charge: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'resource_rate': {'readonly': True}, + 'offer_name': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'order_number': {'readonly': True}, + 'instance_name': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'currency': {'readonly': True}, + 'consumed_quantity': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'pretax_cost': {'readonly': True}, + 'is_estimated': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'subscription_guid': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'account_name': {'readonly': True}, + 'department_name': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'additional_properties': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'plan_name': {'readonly': True}, + 'is_recurring_charge': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, + 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, + 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, + 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, + 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, + 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(Marketplace, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.resource_rate = None + self.offer_name = None + self.resource_group = None + self.order_number = None + self.instance_name = None + self.instance_id = None + self.currency = None + self.consumed_quantity = None + self.unit_of_measure = None + self.pretax_cost = None + self.is_estimated = None + self.meter_id = None + self.subscription_guid = None + self.subscription_name = None + self.account_name = None + self.department_name = None + self.consumed_service = None + self.cost_center = None + self.additional_properties = None + self.publisher_name = None + self.plan_name = None + self.is_recurring_charge = None + + +class MeterDetails(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit: The unit in which the meter consumption is charged, for + example, 'Hours', 'GB', etc. + :vartype unit: str + :ivar meter_location: The location in which the Azure service is + available. + :vartype meter_location: str + :ivar total_included_quantity: The total included quantity associated with + the offer. + :vartype total_included_quantity: decimal.Decimal + :ivar pretax_standard_rate: The pretax listing price. + :vartype pretax_standard_rate: decimal.Decimal + :ivar service_name: The name of the service. + :vartype service_name: str + :ivar service_tier: The service tier. + :vartype service_tier: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit': {'readonly': True}, + 'meter_location': {'readonly': True}, + 'total_included_quantity': {'readonly': True}, + 'pretax_standard_rate': {'readonly': True}, + 'service_name': {'readonly': True}, + 'service_tier': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'meter_location': {'key': 'meterLocation', 'type': 'str'}, + 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, + 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_tier': {'key': 'serviceTier', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MeterDetails, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit = None + self.meter_location = None + self.total_included_quantity = None + self.pretax_standard_rate = None + self.service_name = None + self.service_tier = None + + +class MeterDetailsResponse(Model): + """The properties of the meter detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_name: The name of the meter, within the given meter category + :vartype meter_name: str + :ivar meter_category: The category of the meter, for example, 'Cloud + services', 'Networking', etc.. + :vartype meter_category: str + :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 + Cloud services', 'ExpressRoute (IXP)', etc.. + :vartype meter_sub_category: str + :ivar unit_of_measure: The unit in which the meter consumption is charged, + for example, 'Hours', 'GB', etc. + :vartype unit_of_measure: str + :ivar service_family: The service family. + :vartype service_family: str + """ + + _validation = { + 'meter_name': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'service_family': {'readonly': True}, + } + + _attribute_map = { + 'meter_name': {'key': 'meterName', 'type': 'str'}, + 'meter_category': {'key': 'meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'service_family': {'key': 'serviceFamily', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MeterDetailsResponse, self).__init__(**kwargs) + self.meter_name = None + self.meter_category = None + self.meter_sub_category = None + self.unit_of_measure = None + self.service_family = None + + +class ModernChargeSummary(ChargeSummary): + """Modern charge summary. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_period_id: The id of the billing period resource that the + charge belongs to. + :vartype billing_period_id: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: Billing Account Id + :vartype billing_account_id: str + :ivar billing_profile_id: Billing Profile Id + :vartype billing_profile_id: str + :ivar invoice_section_id: Invoice Section Id + :vartype invoice_section_id: str + :ivar customer_id: Customer Id + :vartype customer_id: str + :ivar is_invoiced: Is charge Invoiced + :vartype is_invoiced: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, + 'customer_id': {'readonly': True}, + 'is_invoiced': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, + 'customer_id': {'key': 'properties.customerId', 'type': 'str'}, + 'is_invoiced': {'key': 'properties.isInvoiced', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(ModernChargeSummary, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None + self.customer_id = None + self.is_invoiced = None + self.kind = 'modern' + + +class ModernReservationRecommendation(ReservationRecommendation): + """Modern reservation recommendation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar look_back_period: The number of days of usage to look back for + recommendation. + :vartype look_back_period: str + :ivar instance_flexibility_ratio: The instance Flexibility Ratio. + :vartype instance_flexibility_ratio: int + :ivar instance_flexibility_group: The instance Flexibility Group. + :vartype instance_flexibility_group: str + :ivar normalized_size: The normalized Size. + :vartype normalized_size: str + :ivar recommended_quantity_normalized: The recommended Quantity + Normalized. + :vartype recommended_quantity_normalized: float + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar term: RI recommendations in one or three year terms. + :vartype term: str + :ivar cost_with_no_reserved_instances: The total amount of cost without + reserved instances. + :vartype cost_with_no_reserved_instances: + ~azure.mgmt.consumption.models.Amount + :ivar recommended_quantity: Recommended quality for reserved instances. + :vartype recommended_quantity: decimal.Decimal + :ivar total_cost_with_reserved_instances: The total amount of cost with + reserved instances. + :vartype total_cost_with_reserved_instances: + ~azure.mgmt.consumption.models.Amount + :ivar net_savings: Total estimated savings with reserved instances. + :vartype net_savings: ~azure.mgmt.consumption.models.Amount + :ivar first_usage_date: The usage date for looking back. + :vartype first_usage_date: datetime + :ivar scope: Shared or single recommendation. + :vartype scope: str + :ivar sku_properties: List of sku properties + :vartype sku_properties: list[~azure.mgmt.consumption.models.SkuProperty] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + 'kind': {'required': True}, + 'look_back_period': {'readonly': True}, + 'instance_flexibility_ratio': {'readonly': True}, + 'instance_flexibility_group': {'readonly': True}, + 'normalized_size': {'readonly': True}, + 'recommended_quantity_normalized': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'term': {'readonly': True}, + 'cost_with_no_reserved_instances': {'readonly': True}, + 'recommended_quantity': {'readonly': True}, + 'total_cost_with_reserved_instances': {'readonly': True}, + 'net_savings': {'readonly': True}, + 'first_usage_date': {'readonly': True}, + 'scope': {'readonly': True}, + 'sku_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'int'}, + 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, + 'normalized_size': {'key': 'properties.normalizedSize', 'type': 'str'}, + 'recommended_quantity_normalized': {'key': 'properties.recommendedQuantityNormalized', 'type': 'float'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'Amount'}, + 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, + 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'Amount'}, + 'net_savings': {'key': 'properties.netSavings', 'type': 'Amount'}, + 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'sku_properties': {'key': 'properties.skuProperties', 'type': '[SkuProperty]'}, + } + + def __init__(self, **kwargs) -> None: + super(ModernReservationRecommendation, self).__init__(**kwargs) + self.look_back_period = None + self.instance_flexibility_ratio = None + self.instance_flexibility_group = None + self.normalized_size = None + self.recommended_quantity_normalized = None + self.meter_id = None + self.term = None + self.cost_with_no_reserved_instances = None + self.recommended_quantity = None + self.total_cost_with_reserved_instances = None + self.net_savings = None + self.first_usage_date = None + self.scope = None + self.sku_properties = None + self.kind = 'modern' + + +class ModernUsageDetail(UsageDetail): + """Modern usage detail. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param kind: Required. Constant filled by server. + :type kind: str + :ivar billing_account_id: Billing Account identifier. + :vartype billing_account_id: str + :ivar billing_account_name: Name of the Billing Account. + :vartype billing_account_name: str + :ivar billing_period_start_date: Billing Period Start Date as in the + invoice. + :vartype billing_period_start_date: datetime + :ivar billing_period_end_date: Billing Period End Date as in the invoice. + :vartype billing_period_end_date: datetime + :ivar billing_profile_id: Identifier for the billing profile that groups + costs across invoices in the a singular billing currency across across the + customers who have onboarded the Microsoft customer agreement and the + customers in CSP who have made entitlement purchases like SaaS, + Marketplace, RI, etc. + :vartype billing_profile_id: str + :ivar billing_profile_name: Name of the billing profile that groups costs + across invoices in the a singular billing currency across across the + customers who have onboarded the Microsoft customer agreement and the + customers in CSP who have made entitlement purchases like SaaS, + Marketplace, RI, etc. + :vartype billing_profile_name: str + :ivar subscription_guid: Unique Microsoft generated identifier for the + Azure Subscription. + :vartype subscription_guid: str + :ivar subscription_name: Name of the Azure Subscription. + :vartype subscription_name: str + :ivar date_property: Date for the usage record. + :vartype date_property: datetime + :ivar product: Name of the product that has accrued charges by consumption + or purchase as listed in the invoice. Not available for Marketplace. + :vartype product: str + :ivar meter_id: The meter id (GUID). Not available for marketplace. For + reserved instance this represents the primary meter for which the + reservation was purchased. For the actual VM Size for which the + reservation is purchased see productOrderName. + :vartype meter_id: str + :ivar meter_name: Identifies the name of the meter against which + consumption is measured. + :vartype meter_name: str + :ivar meter_region: Identifies the location of the datacenter for certain + services that are priced based on datacenter location. + :vartype meter_region: str + :ivar meter_category: Identifies the top-level service for the usage. + :vartype meter_category: str + :ivar meter_sub_category: Defines the type or sub-category of Azure + service that can affect the rate. + :vartype meter_sub_category: str + :ivar service_family: List the service family for the product purchased or + charged (Example: Storage ; Compute). + :vartype service_family: str + :ivar quantity: Measure the quantity purchased or consumed.The amount of + the meter used during the billing period. + :vartype quantity: decimal.Decimal + :ivar unit_of_measure: Identifies the Unit that the service is charged in. + For example, GB, hours, 10,000 s. + :vartype unit_of_measure: str + :ivar instance_name: Instance Name. + :vartype instance_name: str + :ivar cost_in_usd: Estimated extendedCost or blended cost before tax in + USD. + :vartype cost_in_usd: decimal.Decimal + :ivar unit_price: Unit Price is the price applicable to you. (your EA or + other contract price). + :vartype unit_price: decimal.Decimal + :ivar billing_currency_code: The currency defining the billed cost. + :vartype billing_currency_code: str + :ivar resource_location: Name of the resource location. + :vartype resource_location: str + :ivar consumed_service: Consumed service name. Name of the azure resource + provider that emits the usage or was purchased. This value is not provided + for marketplace usage. + :vartype consumed_service: str + :ivar service_info1: Service Info 1. + :vartype service_info1: str + :ivar service_info2: Service Info 2. + :vartype service_info2: str + :ivar additional_info: Additional details of this usage item. Use this + field to get usage line item specific details such as the actual VM Size + (ServiceType) or the ratio in which the reservation discount is applied. + :vartype additional_info: str + :ivar invoice_section_id: Identifier of the project that is being charged + in the invoice. Not applicable for Microsoft Customer Agreements onboarded + by partners. + :vartype invoice_section_id: str + :ivar invoice_section_name: Name of the project that is being charged in + the invoice. Not applicable for Microsoft Customer Agreements onboarded by + partners. + :vartype invoice_section_name: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar resource_group: Name of the Azure resource group used for cohesive + lifecycle management of resources. + :vartype resource_group: str + :ivar reservation_id: ARM resource id of the reservation. Only applies to + records relevant to reservations. + :vartype reservation_id: str + :ivar reservation_name: User provided display name of the reservation. + Last known name for a particular day is populated in the daily data. Only + applies to records relevant to reservations. + :vartype reservation_name: str + :ivar product_order_id: The identifier for the asset or Azure plan name + that the subscription belongs to. For example: Azure Plan. For + reservations this is the Reservation Order ID. + :vartype product_order_id: str + :ivar product_order_name: Product Order Name. For reservations this is the + SKU that was purchased. + :vartype product_order_name: str + :ivar is_azure_credit_eligible: Determines if the cost is eligible to be + paid for using Azure credits. + :vartype is_azure_credit_eligible: bool + :ivar term: Term (in months). Displays the term for the validity of the + offer. For example. In case of reserved instances it displays 12 months + for yearly term of reserved instance. For one time purchases or recurring + purchases, the terms displays 1 month; This is not applicable for Azure + consumption. + :vartype term: str + :ivar publisher_name: Name of the publisher of the service including + Microsoft or Third Party publishers. + :vartype publisher_name: str + :ivar publisher_type: Type of publisher that identifies if the publisher + is first party, third party reseller or third party agency. + :vartype publisher_type: str + :ivar charge_type: Indicates a charge represents credits, usage, a + Marketplace purchase, a reservation fee, or a refund. + :vartype charge_type: str + :ivar frequency: Indicates how frequently this charge will occur. OneTime + for purchases which only happen once, Monthly for fees which recur every + month, and UsageBased for charges based on how much a service is used. + :vartype frequency: str + :ivar cost_in_billing_currency: ExtendedCost or blended cost before tax in + billed currency. + :vartype cost_in_billing_currency: decimal.Decimal + :ivar cost_in_pricing_currency: ExtendedCost or blended cost before tax in + pricing currency to correlate with prices. + :vartype cost_in_pricing_currency: decimal.Decimal + :ivar exchange_rate: Exchange rate used in conversion from pricing + currency to billing currency. + :vartype exchange_rate: str + :ivar exchange_rate_date: Date on which exchange rate used in conversion + from pricing currency to billing currency. + :vartype exchange_rate_date: datetime + :ivar invoice_id: Invoice ID as on the invoice where the specific + transaction appears. + :vartype invoice_id: str + :ivar previous_invoice_id: Reference to an original invoice there is a + refund (negative cost). This is populated only when there is a refund. + :vartype previous_invoice_id: str + :ivar pricing_currency_code: Pricing Billing Currency. + :vartype pricing_currency_code: str + :ivar product_identifier: Identifer for the product that has accrued + charges by consumption or purchase . This is the concatenated key of + productId and SKuId in partner center. + :vartype product_identifier: str + :ivar resource_location_normalized: Resource Location Normalized. + :vartype resource_location_normalized: str + :ivar service_period_start_date: Start date for the rating period when the + service usage was rated for charges. The prices for Azure services are + determined for the rating period. + :vartype service_period_start_date: datetime + :ivar service_period_end_date: End date for the period when the service + usage was rated for charges. The prices for Azure services are determined + based on the rating period. + :vartype service_period_end_date: datetime + :ivar customer_tenant_id: Identifier of the customer's AAD tenant. + :vartype customer_tenant_id: str + :ivar customer_name: Name of the customer's AAD tenant. + :vartype customer_name: str + :ivar partner_tenant_id: Identifier for the partner's AAD tenant. + :vartype partner_tenant_id: str + :ivar partner_name: Name of the partner' AAD tenant. + :vartype partner_name: str + :ivar reseller_mpn_id: MPNId for the reseller associated with the + subscription. + :vartype reseller_mpn_id: str + :ivar reseller_name: Reseller Name. + :vartype reseller_name: str + :ivar publisher_id: Publisher Id. + :vartype publisher_id: str + :ivar market_price: Market Price that's charged for the usage. + :vartype market_price: decimal.Decimal + :ivar exchange_rate_pricing_to_billing: Exchange Rate from pricing + currency to billing currency. + :vartype exchange_rate_pricing_to_billing: decimal.Decimal + :ivar payg_cost_in_billing_currency: The amount of PayG cost before tax in + billing currency. + :vartype payg_cost_in_billing_currency: decimal.Decimal + :ivar payg_cost_in_usd: The amount of PayG cost before tax in US Dollar + currency. + :vartype payg_cost_in_usd: decimal.Decimal + :ivar partner_earned_credit_rate: Rate of discount applied if there is a + partner earned credit (PEC) based on partner admin link access. + :vartype partner_earned_credit_rate: decimal.Decimal + :ivar partner_earned_credit_applied: Flag to indicate if partner earned + credit has been applied or not. + :vartype partner_earned_credit_applied: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'kind': {'required': True}, + 'billing_account_id': {'readonly': True}, + 'billing_account_name': {'readonly': True}, + 'billing_period_start_date': {'readonly': True}, + 'billing_period_end_date': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'billing_profile_name': {'readonly': True}, + 'subscription_guid': {'readonly': True}, + 'subscription_name': {'readonly': True}, + 'date_property': {'readonly': True}, + 'product': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_name': {'readonly': True}, + 'meter_region': {'readonly': True}, + 'meter_category': {'readonly': True}, + 'meter_sub_category': {'readonly': True}, + 'service_family': {'readonly': True}, + 'quantity': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'instance_name': {'readonly': True}, + 'cost_in_usd': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'billing_currency_code': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'consumed_service': {'readonly': True}, + 'service_info1': {'readonly': True}, + 'service_info2': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, + 'invoice_section_name': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'resource_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'reservation_name': {'readonly': True}, + 'product_order_id': {'readonly': True}, + 'product_order_name': {'readonly': True}, + 'is_azure_credit_eligible': {'readonly': True}, + 'term': {'readonly': True}, + 'publisher_name': {'readonly': True}, + 'publisher_type': {'readonly': True}, + 'charge_type': {'readonly': True}, + 'frequency': {'readonly': True}, + 'cost_in_billing_currency': {'readonly': True}, + 'cost_in_pricing_currency': {'readonly': True}, + 'exchange_rate': {'readonly': True}, + 'exchange_rate_date': {'readonly': True}, + 'invoice_id': {'readonly': True}, + 'previous_invoice_id': {'readonly': True}, + 'pricing_currency_code': {'readonly': True}, + 'product_identifier': {'readonly': True}, + 'resource_location_normalized': {'readonly': True}, + 'service_period_start_date': {'readonly': True}, + 'service_period_end_date': {'readonly': True}, + 'customer_tenant_id': {'readonly': True}, + 'customer_name': {'readonly': True}, + 'partner_tenant_id': {'readonly': True}, + 'partner_name': {'readonly': True}, + 'reseller_mpn_id': {'readonly': True}, + 'reseller_name': {'readonly': True}, + 'publisher_id': {'readonly': True}, + 'market_price': {'readonly': True}, + 'exchange_rate_pricing_to_billing': {'readonly': True}, + 'payg_cost_in_billing_currency': {'readonly': True}, + 'payg_cost_in_usd': {'readonly': True}, + 'partner_earned_credit_rate': {'readonly': True}, + 'partner_earned_credit_applied': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, + 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, + 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, + 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, + 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, + 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, + 'meter_name': {'key': 'properties.meterName', 'type': 'str'}, + 'meter_region': {'key': 'properties.meterRegion', 'type': 'str'}, + 'meter_category': {'key': 'properties.meterCategory', 'type': 'str'}, + 'meter_sub_category': {'key': 'properties.meterSubCategory', 'type': 'str'}, + 'service_family': {'key': 'properties.serviceFamily', 'type': 'str'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, + 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, + 'cost_in_usd': {'key': 'properties.costInUSD', 'type': 'decimal'}, + 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, + 'billing_currency_code': {'key': 'properties.billingCurrencyCode', 'type': 'str'}, + 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, + 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, + 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, + 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, + 'invoice_section_name': {'key': 'properties.invoiceSectionName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, + 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, + 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, + 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, + 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, + 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, + 'frequency': {'key': 'properties.frequency', 'type': 'str'}, + 'cost_in_billing_currency': {'key': 'properties.costInBillingCurrency', 'type': 'decimal'}, + 'cost_in_pricing_currency': {'key': 'properties.costInPricingCurrency', 'type': 'decimal'}, + 'exchange_rate': {'key': 'properties.exchangeRate', 'type': 'str'}, + 'exchange_rate_date': {'key': 'properties.exchangeRateDate', 'type': 'iso-8601'}, + 'invoice_id': {'key': 'properties.invoiceId', 'type': 'str'}, + 'previous_invoice_id': {'key': 'properties.previousInvoiceId', 'type': 'str'}, + 'pricing_currency_code': {'key': 'properties.pricingCurrencyCode', 'type': 'str'}, + 'product_identifier': {'key': 'properties.productIdentifier', 'type': 'str'}, + 'resource_location_normalized': {'key': 'properties.resourceLocationNormalized', 'type': 'str'}, + 'service_period_start_date': {'key': 'properties.servicePeriodStartDate', 'type': 'iso-8601'}, + 'service_period_end_date': {'key': 'properties.servicePeriodEndDate', 'type': 'iso-8601'}, + 'customer_tenant_id': {'key': 'properties.customerTenantId', 'type': 'str'}, + 'customer_name': {'key': 'properties.customerName', 'type': 'str'}, + 'partner_tenant_id': {'key': 'properties.partnerTenantId', 'type': 'str'}, + 'partner_name': {'key': 'properties.partnerName', 'type': 'str'}, + 'reseller_mpn_id': {'key': 'properties.resellerMpnId', 'type': 'str'}, + 'reseller_name': {'key': 'properties.resellerName', 'type': 'str'}, + 'publisher_id': {'key': 'properties.publisherId', 'type': 'str'}, + 'market_price': {'key': 'properties.marketPrice', 'type': 'decimal'}, + 'exchange_rate_pricing_to_billing': {'key': 'properties.exchangeRatePricingToBilling', 'type': 'decimal'}, + 'payg_cost_in_billing_currency': {'key': 'properties.paygCostInBillingCurrency', 'type': 'decimal'}, + 'payg_cost_in_usd': {'key': 'properties.paygCostInUSD', 'type': 'decimal'}, + 'partner_earned_credit_rate': {'key': 'properties.partnerEarnedCreditRate', 'type': 'decimal'}, + 'partner_earned_credit_applied': {'key': 'properties.partnerEarnedCreditApplied', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ModernUsageDetail, self).__init__(**kwargs) + self.billing_account_id = None + self.billing_account_name = None + self.billing_period_start_date = None + self.billing_period_end_date = None + self.billing_profile_id = None + self.billing_profile_name = None + self.subscription_guid = None + self.subscription_name = None + self.date_property = None + self.product = None + self.meter_id = None + self.meter_name = None + self.meter_region = None + self.meter_category = None + self.meter_sub_category = None + self.service_family = None + self.quantity = None + self.unit_of_measure = None + self.instance_name = None + self.cost_in_usd = None + self.unit_price = None + self.billing_currency_code = None + self.resource_location = None + self.consumed_service = None + self.service_info1 = None + self.service_info2 = None + self.additional_info = None + self.invoice_section_id = None + self.invoice_section_name = None + self.cost_center = None + self.resource_group = None + self.reservation_id = None + self.reservation_name = None + self.product_order_id = None + self.product_order_name = None + self.is_azure_credit_eligible = None + self.term = None + self.publisher_name = None + self.publisher_type = None + self.charge_type = None + self.frequency = None + self.cost_in_billing_currency = None + self.cost_in_pricing_currency = None + self.exchange_rate = None + self.exchange_rate_date = None + self.invoice_id = None + self.previous_invoice_id = None + self.pricing_currency_code = None + self.product_identifier = None + self.resource_location_normalized = None + self.service_period_start_date = None + self.service_period_end_date = None + self.customer_tenant_id = None + self.customer_name = None + self.partner_tenant_id = None + self.partner_name = None + self.reseller_mpn_id = None + self.reseller_name = None + self.publisher_id = None + self.market_price = None + self.exchange_rate_pricing_to_billing = None + self.payg_cost_in_billing_currency = None + self.payg_cost_in_usd = None + self.partner_earned_credit_rate = None + self.partner_earned_credit_applied = None + self.kind = 'modern' + + +class Notification(Model): + """The notification associated with a budget. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. The notification is enabled or not. + :type enabled: bool + :param operator: Required. The comparison operator. Possible values + include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + :type operator: str or ~azure.mgmt.consumption.models.OperatorType + :param threshold: Required. Threshold value associated with a + notification. Notification is sent when the cost exceeded the threshold. + It is always percent and has to be between 0 and 1000. + :type threshold: decimal.Decimal + :param contact_emails: Required. Email addresses to send the budget + notification to when the threshold is exceeded. + :type contact_emails: list[str] + :param contact_roles: Contact roles to send the budget notification to + when the threshold is exceeded. + :type contact_roles: list[str] + :param contact_groups: Action groups to send the budget notification to + when the threshold is exceeded. + :type contact_groups: list[str] + """ + + _validation = { + 'enabled': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, + 'contact_groups': {'max_items': 50, 'min_items': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'decimal'}, + 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, + 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, + 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, + } + + def __init__(self, *, enabled: bool, operator, threshold, contact_emails, contact_roles=None, contact_groups=None, **kwargs) -> None: + super(Notification, self).__init__(**kwargs) + self.enabled = enabled + self.operator = operator + self.threshold = threshold + self.contact_emails = contact_emails + self.contact_roles = contact_roles + self.contact_groups = contact_groups + + +class Operation(Model): + """A Consumption REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.consumption.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.Consumption. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: UsageDetail, + etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class PriceSheetProperties(Model): + """The properties of the price sheet. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar meter_id: The meter id (GUID) + :vartype meter_id: str + :ivar meter_details: The details about the meter. By default this is not + populated, unless it's specified in $expand. + :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails + :ivar unit_of_measure: Unit of measure + :vartype unit_of_measure: str + :ivar included_quantity: Included quality for an offer + :vartype included_quantity: decimal.Decimal + :ivar part_number: Part Number + :vartype part_number: str + :ivar unit_price: Unit Price + :vartype unit_price: decimal.Decimal + :ivar currency_code: Currency Code + :vartype currency_code: str + :ivar offer_id: Offer Id + :vartype offer_id: str + """ + + _validation = { + 'billing_period_id': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_details': {'readonly': True}, + 'unit_of_measure': {'readonly': True}, + 'included_quantity': {'readonly': True}, + 'part_number': {'readonly': True}, + 'unit_price': {'readonly': True}, + 'currency_code': {'readonly': True}, + 'offer_id': {'readonly': True}, + } + + _attribute_map = { + 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, + 'meter_id': {'key': 'meterId', 'type': 'str'}, + 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, + 'part_number': {'key': 'partNumber', 'type': 'str'}, + 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, + 'currency_code': {'key': 'currencyCode', 'type': 'str'}, + 'offer_id': {'key': 'offerId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PriceSheetProperties, self).__init__(**kwargs) + self.billing_period_id = None + self.meter_id = None + self.meter_details = None + self.unit_of_measure = None + self.included_quantity = None + self.part_number = None + self.unit_price = None + self.currency_code = None + self.offer_id = None + + +class PriceSheetResult(Resource): + """An pricesheet resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar pricesheets: Price sheet + :vartype pricesheets: + list[~azure.mgmt.consumption.models.PriceSheetProperties] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'pricesheets': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PriceSheetResult, self).__init__(**kwargs) + self.pricesheets = None + self.next_link = None + + +class ReservationDetail(Resource): + """reservation detail resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar instance_flexibility_ratio: The instance Flexibility Ratio. + :vartype instance_flexibility_ratio: str + :ivar instance_flexibility_group: The instance Flexibility Group. + :vartype instance_flexibility_group: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved for the day. E.g. + if reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days. + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: The date on which consumption occurred. + :vartype usage_date: datetime + :ivar used_hours: This is the total hours used by the instance. + :vartype used_hours: decimal.Decimal + :ivar instance_id: This identifier is the name of the resource or the + fully qualified Resource ID. + :vartype instance_id: str + :ivar total_reserved_quantity: This is the total count of instances that + are reserved for the reservationId. + :vartype total_reserved_quantity: decimal.Decimal + :ivar kind: The reservation kind. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'instance_flexibility_ratio': {'readonly': True}, + 'instance_flexibility_group': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'instance_id': {'readonly': True}, + 'total_reserved_quantity': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'instance_flexibility_ratio': {'key': 'properties.instanceFlexibilityRatio', 'type': 'str'}, + 'instance_flexibility_group': {'key': 'properties.instanceFlexibilityGroup', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, + 'kind': {'key': 'properties.kind', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReservationDetail, self).__init__(**kwargs) + self.reservation_order_id = None + self.instance_flexibility_ratio = None + self.instance_flexibility_group = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.instance_id = None + self.total_reserved_quantity = None + self.kind = None + + +class ReservationSummary(Resource): + """reservation summary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar reservation_id: The reservation ID is the identifier of a + reservation within a reservation order. Each reservation is the grouping + for applying the benefit scope and also specifies the number of instances + to which the reservation benefit can be applied to. + :vartype reservation_id: str + :ivar sku_name: This is the ARM Sku name. It can be used to join with the + serviceType field in additional info in usage records. + :vartype sku_name: str + :ivar reserved_hours: This is the total hours reserved. E.g. if + reservation for 1 instance was made on 1 PM, this will be 11 hours for + that day and 24 hours from subsequent days + :vartype reserved_hours: decimal.Decimal + :ivar usage_date: Data corresponding to the utilization record. If the + grain of data is monthly, it will be first day of month. + :vartype usage_date: datetime + :ivar used_hours: Total used hours by the reservation + :vartype used_hours: decimal.Decimal + :ivar min_utilization_percentage: This is the minimum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field + will return 10% for that day + :vartype min_utilization_percentage: decimal.Decimal + :ivar avg_utilization_percentage: This is average utilization for the + entire time range. (day or month depending on the grain) + :vartype avg_utilization_percentage: decimal.Decimal + :ivar max_utilization_percentage: This is the maximum hourly utilization + in the usage time (day or month). E.g. if usage record corresponds to + 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field + will return 100% for that day. + :vartype max_utilization_percentage: decimal.Decimal + :ivar kind: The reservation kind. + :vartype kind: str + :ivar purchased_quantity: This is the purchased quantity for the + reservationId. + :vartype purchased_quantity: decimal.Decimal + :ivar remaining_quantity: This is the remaining quantity for the + reservationId. + :vartype remaining_quantity: decimal.Decimal + :ivar total_reserved_quantity: This is the total count of instances that + are reserved for the reservationId. + :vartype total_reserved_quantity: decimal.Decimal + :ivar used_quantity: This is the used quantity for the reservationId. + :vartype used_quantity: decimal.Decimal + :ivar utilized_percentage: This is the utilized percentage for the + reservation Id. + :vartype utilized_percentage: decimal.Decimal + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'reservation_id': {'readonly': True}, + 'sku_name': {'readonly': True}, + 'reserved_hours': {'readonly': True}, + 'usage_date': {'readonly': True}, + 'used_hours': {'readonly': True}, + 'min_utilization_percentage': {'readonly': True}, + 'avg_utilization_percentage': {'readonly': True}, + 'max_utilization_percentage': {'readonly': True}, + 'kind': {'readonly': True}, + 'purchased_quantity': {'readonly': True}, + 'remaining_quantity': {'readonly': True}, + 'total_reserved_quantity': {'readonly': True}, + 'used_quantity': {'readonly': True}, + 'utilized_percentage': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, + 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, + 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, + 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, + 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, + 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, + 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, + 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, + 'kind': {'key': 'properties.kind', 'type': 'str'}, + 'purchased_quantity': {'key': 'properties.purchasedQuantity', 'type': 'decimal'}, + 'remaining_quantity': {'key': 'properties.remainingQuantity', 'type': 'decimal'}, + 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, + 'used_quantity': {'key': 'properties.usedQuantity', 'type': 'decimal'}, + 'utilized_percentage': {'key': 'properties.utilizedPercentage', 'type': 'decimal'}, + } + + def __init__(self, **kwargs) -> None: + super(ReservationSummary, self).__init__(**kwargs) + self.reservation_order_id = None + self.reservation_id = None + self.sku_name = None + self.reserved_hours = None + self.usage_date = None + self.used_hours = None + self.min_utilization_percentage = None + self.avg_utilization_percentage = None + self.max_utilization_percentage = None + self.kind = None + self.purchased_quantity = None + self.remaining_quantity = None + self.total_reserved_quantity = None + self.used_quantity = None + self.utilized_percentage = None + + +class ReservationTransaction(Resource): + """Reservation transaction resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar event_date: The date of the transaction + :vartype event_date: datetime + :ivar reservation_order_id: The reservation order ID is the identifier for + a reservation purchase. Each reservation order ID represents a single + purchase transaction. A reservation order contains reservations. The + reservation order specifies the VM size and region for the reservations. + :vartype reservation_order_id: str + :ivar description: The description of the transaction. + :vartype description: str + :ivar event_type: The type of the transaction (Purchase, Cancel, etc.) + :vartype event_type: str + :ivar quantity: The quantity of the transaction. + :vartype quantity: decimal.Decimal + :ivar amount: The charge of the transaction. + :vartype amount: decimal.Decimal + :ivar currency: The ISO currency in which the transaction is charged, for + example, USD. + :vartype currency: str + :ivar reservation_order_name: The name of the reservation order. + :vartype reservation_order_name: str + :ivar purchasing_enrollment: The purchasing enrollment. + :vartype purchasing_enrollment: str + :ivar purchasing_subscription_guid: The subscription guid that makes the + transaction. + :vartype purchasing_subscription_guid: str + :ivar purchasing_subscription_name: The subscription name that makes the + transaction. + :vartype purchasing_subscription_name: str + :ivar arm_sku_name: This is the ARM Sku name. It can be used to join with + the serviceType field in additional info in usage records. + :vartype arm_sku_name: str + :ivar term: This is the term of the transaction. + :vartype term: str + :ivar region: The region of the transaction. + :vartype region: str + :ivar account_name: The name of the account that makes the transaction. + :vartype account_name: str + :ivar account_owner_email: The email of the account owner that makes the + transaction. + :vartype account_owner_email: str + :ivar department_name: The department name. + :vartype department_name: str + :ivar cost_center: The cost center of this department if it is a + department and a cost center is provided. + :vartype cost_center: str + :ivar current_enrollment: The current enrollment. + :vartype current_enrollment: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'event_date': {'readonly': True}, + 'reservation_order_id': {'readonly': True}, + 'description': {'readonly': True}, + 'event_type': {'readonly': True}, + 'quantity': {'readonly': True}, + 'amount': {'readonly': True}, + 'currency': {'readonly': True}, + 'reservation_order_name': {'readonly': True}, + 'purchasing_enrollment': {'readonly': True}, + 'purchasing_subscription_guid': {'readonly': True}, + 'purchasing_subscription_name': {'readonly': True}, + 'arm_sku_name': {'readonly': True}, + 'term': {'readonly': True}, + 'region': {'readonly': True}, + 'account_name': {'readonly': True}, + 'account_owner_email': {'readonly': True}, + 'department_name': {'readonly': True}, + 'cost_center': {'readonly': True}, + 'current_enrollment': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'event_date': {'key': 'properties.eventDate', 'type': 'iso-8601'}, + 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'event_type': {'key': 'properties.eventType', 'type': 'str'}, + 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, + 'amount': {'key': 'properties.amount', 'type': 'decimal'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'reservation_order_name': {'key': 'properties.reservationOrderName', 'type': 'str'}, + 'purchasing_enrollment': {'key': 'properties.purchasingEnrollment', 'type': 'str'}, + 'purchasing_subscription_guid': {'key': 'properties.purchasingSubscriptionGuid', 'type': 'str'}, + 'purchasing_subscription_name': {'key': 'properties.purchasingSubscriptionName', 'type': 'str'}, + 'arm_sku_name': {'key': 'properties.armSkuName', 'type': 'str'}, + 'term': {'key': 'properties.term', 'type': 'str'}, + 'region': {'key': 'properties.region', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'account_owner_email': {'key': 'properties.accountOwnerEmail', 'type': 'str'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'current_enrollment': {'key': 'properties.currentEnrollment', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ReservationTransaction, self).__init__(**kwargs) + self.event_date = None + self.reservation_order_id = None + self.description = None + self.event_type = None + self.quantity = None + self.amount = None + self.currency = None + self.reservation_order_name = None + self.purchasing_enrollment = None + self.purchasing_subscription_guid = None + self.purchasing_subscription_name = None + self.arm_sku_name = None + self.term = None + self.region = None + self.account_name = None + self.account_owner_email = None + self.department_name = None + self.cost_center = None + self.current_enrollment = None + + +class ResourceAttributes(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Resource location + :vartype location: str + :ivar sku: Resource sku + :vartype sku: str + """ + + _validation = { + 'location': {'readonly': True}, + 'sku': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceAttributes, self).__init__(**kwargs) + self.location = None + self.sku = None + + +class SkuProperty(Model): + """The Sku property. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of sku property. + :vartype name: str + :ivar value: The value of sku property. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SkuProperty, self).__init__(**kwargs) + self.name = None + self.value = None + + +class Tag(Model): + """The tag resource. + + :param key: Tag key. + :type key: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, **kwargs) -> None: + super(Tag, self).__init__(**kwargs) + self.key = key + + +class TagsResult(ProxyResource): + """A resource listing all tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param e_tag: eTag of the resource. To handle concurrent update scenario, + this field will be used to determine whether the user is updating the + latest version or not. + :type e_tag: str + :param tags: A list of Tag. + :type tags: list[~azure.mgmt.consumption.models.Tag] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + } + + def __init__(self, *, e_tag: str=None, tags=None, **kwargs) -> None: + super(TagsResult, self).__init__(e_tag=e_tag, **kwargs) + self.tags = tags diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_paged_models.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_paged_models.py new file mode 100644 index 000000000000..705ddbb5f5f0 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/_paged_models.py @@ -0,0 +1,157 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class UsageDetailPaged(Paged): + """ + A paging container for iterating over a list of :class:`UsageDetail ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UsageDetail]'} + } + + def __init__(self, *args, **kwargs): + + super(UsageDetailPaged, self).__init__(*args, **kwargs) +class MarketplacePaged(Paged): + """ + A paging container for iterating over a list of :class:`Marketplace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Marketplace]'} + } + + def __init__(self, *args, **kwargs): + + super(MarketplacePaged, self).__init__(*args, **kwargs) +class BudgetPaged(Paged): + """ + A paging container for iterating over a list of :class:`Budget ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Budget]'} + } + + def __init__(self, *args, **kwargs): + + super(BudgetPaged, self).__init__(*args, **kwargs) +class ReservationSummaryPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationSummary ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationSummary]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationSummaryPaged, self).__init__(*args, **kwargs) +class ReservationDetailPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationDetail ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationDetail]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationDetailPaged, self).__init__(*args, **kwargs) +class ReservationRecommendationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationRecommendation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationRecommendation]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationRecommendationPaged, self).__init__(*args, **kwargs) +class ReservationTransactionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ReservationTransaction ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ReservationTransaction]'} + } + + def __init__(self, *args, **kwargs): + + super(ReservationTransactionPaged, self).__init__(*args, **kwargs) +class ForecastPaged(Paged): + """ + A paging container for iterating over a list of :class:`Forecast ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Forecast]'} + } + + def __init__(self, *args, **kwargs): + + super(ForecastPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class EventSummaryPaged(Paged): + """ + A paging container for iterating over a list of :class:`EventSummary ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EventSummary]'} + } + + def __init__(self, *args, **kwargs): + + super(EventSummaryPaged, self).__init__(*args, **kwargs) +class LotSummaryPaged(Paged): + """ + A paging container for iterating over a list of :class:`LotSummary ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[LotSummary]'} + } + + def __init__(self, *args, **kwargs): + + super(LotSummaryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py deleted file mode 100644 index 88be1e0fa0a5..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Balance(Resource): - """A balance resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar beginning_balance: The beginning balance for the billing period. - :vartype beginning_balance: decimal.Decimal - :ivar ending_balance: The ending balance for the billing period (for open - periods this will be updated daily). - :vartype ending_balance: decimal.Decimal - :ivar new_purchases: Total new purchase amount. - :vartype new_purchases: decimal.Decimal - :ivar adjustments: Total adjustment amount. - :vartype adjustments: decimal.Decimal - :ivar utilized: Total Commitment usage. - :vartype utilized: decimal.Decimal - :ivar service_overage: Overage for Azure services. - :vartype service_overage: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar total_overage: serviceOverage + chargesBilledSeparately. - :vartype total_overage: decimal.Decimal - :ivar total_usage: Azure service commitment + total Overage. - :vartype total_usage: decimal.Decimal - :ivar azure_marketplace_service_charges: Total charges for Azure - Marketplace. - :vartype azure_marketplace_service_charges: decimal.Decimal - :param billing_frequency: The billing frequency. Possible values include: - 'Month', 'Quarter', 'Year' - :type billing_frequency: str or - ~azure.mgmt.consumption.models.BillingFrequency - :ivar price_hidden: Price is hidden or not. - :vartype price_hidden: bool - :ivar new_purchases_details: List of new purchases. - :vartype new_purchases_details: - list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] - :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit - etc.). - :vartype adjustment_details: - list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'currency': {'readonly': True}, - 'beginning_balance': {'readonly': True}, - 'ending_balance': {'readonly': True}, - 'new_purchases': {'readonly': True}, - 'adjustments': {'readonly': True}, - 'utilized': {'readonly': True}, - 'service_overage': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'total_overage': {'readonly': True}, - 'total_usage': {'readonly': True}, - 'azure_marketplace_service_charges': {'readonly': True}, - 'price_hidden': {'readonly': True}, - 'new_purchases_details': {'readonly': True}, - 'adjustment_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, - 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, - 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, - 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, - 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, - 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, - 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, - 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, - 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, - 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, - 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, - 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, - } - - def __init__(self, **kwargs): - super(Balance, self).__init__(**kwargs) - self.currency = None - self.beginning_balance = None - self.ending_balance = None - self.new_purchases = None - self.adjustments = None - self.utilized = None - self.service_overage = None - self.charges_billed_separately = None - self.total_overage = None - self.total_usage = None - self.azure_marketplace_service_charges = None - self.billing_frequency = kwargs.get('billing_frequency', None) - self.price_hidden = None - self.new_purchases_details = None - self.adjustment_details = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py deleted file mode 100644 index a0b9af41285c..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesAdjustmentDetailsItem(Model): - """BalancePropertiesAdjustmentDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new adjustment. - :vartype name: str - :ivar value: the value of new adjustment. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py deleted file mode 100644 index 0fc6b3b377fc..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesAdjustmentDetailsItem(Model): - """BalancePropertiesAdjustmentDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new adjustment. - :vartype name: str - :ivar value: the value of new adjustment. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py deleted file mode 100644 index c50e5ad24216..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesNewPurchasesDetailsItem(Model): - """BalancePropertiesNewPurchasesDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new purchase. - :vartype name: str - :ivar value: the value of new purchase. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py deleted file mode 100644 index 278a07609ebf..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BalancePropertiesNewPurchasesDetailsItem(Model): - """BalancePropertiesNewPurchasesDetailsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: the name of new purchase. - :vartype name: str - :ivar value: the value of new purchase. - :vartype value: decimal.Decimal - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) - self.name = None - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py deleted file mode 100644 index 8208ab5e2150..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Balance(Resource): - """A balance resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar beginning_balance: The beginning balance for the billing period. - :vartype beginning_balance: decimal.Decimal - :ivar ending_balance: The ending balance for the billing period (for open - periods this will be updated daily). - :vartype ending_balance: decimal.Decimal - :ivar new_purchases: Total new purchase amount. - :vartype new_purchases: decimal.Decimal - :ivar adjustments: Total adjustment amount. - :vartype adjustments: decimal.Decimal - :ivar utilized: Total Commitment usage. - :vartype utilized: decimal.Decimal - :ivar service_overage: Overage for Azure services. - :vartype service_overage: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar total_overage: serviceOverage + chargesBilledSeparately. - :vartype total_overage: decimal.Decimal - :ivar total_usage: Azure service commitment + total Overage. - :vartype total_usage: decimal.Decimal - :ivar azure_marketplace_service_charges: Total charges for Azure - Marketplace. - :vartype azure_marketplace_service_charges: decimal.Decimal - :param billing_frequency: The billing frequency. Possible values include: - 'Month', 'Quarter', 'Year' - :type billing_frequency: str or - ~azure.mgmt.consumption.models.BillingFrequency - :ivar price_hidden: Price is hidden or not. - :vartype price_hidden: bool - :ivar new_purchases_details: List of new purchases. - :vartype new_purchases_details: - list[~azure.mgmt.consumption.models.BalancePropertiesNewPurchasesDetailsItem] - :ivar adjustment_details: List of Adjustments (Promo credit, SIE credit - etc.). - :vartype adjustment_details: - list[~azure.mgmt.consumption.models.BalancePropertiesAdjustmentDetailsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'currency': {'readonly': True}, - 'beginning_balance': {'readonly': True}, - 'ending_balance': {'readonly': True}, - 'new_purchases': {'readonly': True}, - 'adjustments': {'readonly': True}, - 'utilized': {'readonly': True}, - 'service_overage': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'total_overage': {'readonly': True}, - 'total_usage': {'readonly': True}, - 'azure_marketplace_service_charges': {'readonly': True}, - 'price_hidden': {'readonly': True}, - 'new_purchases_details': {'readonly': True}, - 'adjustment_details': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'beginning_balance': {'key': 'properties.beginningBalance', 'type': 'decimal'}, - 'ending_balance': {'key': 'properties.endingBalance', 'type': 'decimal'}, - 'new_purchases': {'key': 'properties.newPurchases', 'type': 'decimal'}, - 'adjustments': {'key': 'properties.adjustments', 'type': 'decimal'}, - 'utilized': {'key': 'properties.utilized', 'type': 'decimal'}, - 'service_overage': {'key': 'properties.serviceOverage', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'total_overage': {'key': 'properties.totalOverage', 'type': 'decimal'}, - 'total_usage': {'key': 'properties.totalUsage', 'type': 'decimal'}, - 'azure_marketplace_service_charges': {'key': 'properties.azureMarketplaceServiceCharges', 'type': 'decimal'}, - 'billing_frequency': {'key': 'properties.billingFrequency', 'type': 'str'}, - 'price_hidden': {'key': 'properties.priceHidden', 'type': 'bool'}, - 'new_purchases_details': {'key': 'properties.newPurchasesDetails', 'type': '[BalancePropertiesNewPurchasesDetailsItem]'}, - 'adjustment_details': {'key': 'properties.adjustmentDetails', 'type': '[BalancePropertiesAdjustmentDetailsItem]'}, - } - - def __init__(self, *, billing_frequency=None, **kwargs) -> None: - super(Balance, self).__init__(**kwargs) - self.currency = None - self.beginning_balance = None - self.ending_balance = None - self.new_purchases = None - self.adjustments = None - self.utilized = None - self.service_overage = None - self.charges_billed_separately = None - self.total_overage = None - self.total_usage = None - self.azure_marketplace_service_charges = None - self.billing_frequency = billing_frequency - self.price_hidden = None - self.new_purchases_details = None - self.adjustment_details = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py deleted file mode 100644 index 320d185716fc..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class Budget(ProxyResource): - """A budget resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param category: Required. The category of the budget, whether the budget - tracks cost or usage. Possible values include: 'Cost', 'Usage' - :type category: str or ~azure.mgmt.consumption.models.CategoryType - :param amount: Required. The total amount of cost to track with the budget - :type amount: decimal.Decimal - :param time_grain: Required. The time covered by a budget. Tracking of the - amount will be reset based on the time grain. Possible values include: - 'Monthly', 'Quarterly', 'Annually' - :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType - :param time_period: Required. Has start and end date of the budget. The - start date must be first of the month and should be less than the end - date. Budget start date must be on or after June 1, 2017. Future start - date should not be more than three months. Past start date should be - selected within the timegrain period. There are no restrictions on the end - date. - :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filters: May be used to filter budgets by resource group, resource, - or meter. - :type filters: ~azure.mgmt.consumption.models.Filters - :ivar current_spend: The current amount of cost which is being tracked for - a budget. - :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend - :param notifications: Dictionary of notifications associated with the - budget. Budget can have up to five notifications. - :type notifications: dict[str, - ~azure.mgmt.consumption.models.Notification] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'amount': {'required': True}, - 'time_grain': {'required': True}, - 'time_period': {'required': True}, - 'current_spend': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'amount': {'key': 'properties.amount', 'type': 'decimal'}, - 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, - 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, - 'filters': {'key': 'properties.filters', 'type': 'Filters'}, - 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, - 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, - } - - def __init__(self, **kwargs): - super(Budget, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.amount = kwargs.get('amount', None) - self.time_grain = kwargs.get('time_grain', None) - self.time_period = kwargs.get('time_period', None) - self.filters = kwargs.get('filters', None) - self.current_spend = None - self.notifications = kwargs.get('notifications', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py deleted file mode 100644 index 2668382253e2..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class BudgetPaged(Paged): - """ - A paging container for iterating over a list of :class:`Budget ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Budget]'} - } - - def __init__(self, *args, **kwargs): - - super(BudgetPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py deleted file mode 100644 index 522ea98b4572..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class Budget(ProxyResource): - """A budget resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param category: Required. The category of the budget, whether the budget - tracks cost or usage. Possible values include: 'Cost', 'Usage' - :type category: str or ~azure.mgmt.consumption.models.CategoryType - :param amount: Required. The total amount of cost to track with the budget - :type amount: decimal.Decimal - :param time_grain: Required. The time covered by a budget. Tracking of the - amount will be reset based on the time grain. Possible values include: - 'Monthly', 'Quarterly', 'Annually' - :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType - :param time_period: Required. Has start and end date of the budget. The - start date must be first of the month and should be less than the end - date. Budget start date must be on or after June 1, 2017. Future start - date should not be more than three months. Past start date should be - selected within the timegrain period. There are no restrictions on the end - date. - :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filters: May be used to filter budgets by resource group, resource, - or meter. - :type filters: ~azure.mgmt.consumption.models.Filters - :ivar current_spend: The current amount of cost which is being tracked for - a budget. - :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend - :param notifications: Dictionary of notifications associated with the - budget. Budget can have up to five notifications. - :type notifications: dict[str, - ~azure.mgmt.consumption.models.Notification] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'amount': {'required': True}, - 'time_grain': {'required': True}, - 'time_period': {'required': True}, - 'current_spend': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'amount': {'key': 'properties.amount', 'type': 'decimal'}, - 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, - 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, - 'filters': {'key': 'properties.filters', 'type': 'Filters'}, - 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, - 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, - } - - def __init__(self, *, category, amount, time_grain, time_period, e_tag: str=None, filters=None, notifications=None, **kwargs) -> None: - super(Budget, self).__init__(e_tag=e_tag, **kwargs) - self.category = category - self.amount = amount - self.time_grain = time_grain - self.time_period = time_period - self.filters = filters - self.current_spend = None - self.notifications = notifications diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py deleted file mode 100644 index a0fe9658a07f..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BudgetTimePeriod(Model): - """The start and end date for a budget. - - All required parameters must be populated in order to send to Azure. - - :param start_date: Required. The start date for the budget. - :type start_date: datetime - :param end_date: The end date for the budget. If not provided, we default - this to 10 years from the start date. - :type end_date: datetime - """ - - _validation = { - 'start_date': {'required': True}, - } - - _attribute_map = { - 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(BudgetTimePeriod, self).__init__(**kwargs) - self.start_date = kwargs.get('start_date', None) - self.end_date = kwargs.get('end_date', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py deleted file mode 100644 index de0258c1d63f..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class BudgetTimePeriod(Model): - """The start and end date for a budget. - - All required parameters must be populated in order to send to Azure. - - :param start_date: Required. The start date for the budget. - :type start_date: datetime - :param end_date: The end date for the budget. If not provided, we default - this to 10 years from the start date. - :type end_date: datetime - """ - - _validation = { - 'start_date': {'required': True}, - } - - _attribute_map = { - 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, start_date, end_date=None, **kwargs) -> None: - super(BudgetTimePeriod, self).__init__(**kwargs) - self.start_date = start_date - self.end_date = end_date diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py deleted file mode 100644 index d3a3bbaaa8b0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ChargeSummary(Resource): - """A charge summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - charge belongs to. - :vartype billing_period_id: str - :ivar usage_start: Usage start date. - :vartype usage_start: str - :ivar usage_end: Usage end date. - :vartype usage_end: str - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar currency: Currency Code - :vartype currency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ChargeSummary, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.charges_billed_separately = None - self.marketplace_charges = None - self.currency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py deleted file mode 100644 index 1f6031eed7c4..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ChargeSummary(Resource): - """A charge summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - charge belongs to. - :vartype billing_period_id: str - :ivar usage_start: Usage start date. - :vartype usage_start: str - :ivar usage_end: Usage end date. - :vartype usage_end: str - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar currency: Currency Code - :vartype currency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ChargeSummary, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.charges_billed_separately = None - self.marketplace_charges = None - self.currency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py deleted file mode 100644 index 7d968d08a465..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChargesListResult(Model): - """Result of listing charge summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of charge summary - :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ChargeSummary]'}, - } - - def __init__(self, **kwargs): - super(ChargesListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py deleted file mode 100644 index 3c6e3404673b..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ChargesListResult(Model): - """Result of listing charge summary. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of charge summary - :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ChargeSummary]'}, - } - - def __init__(self, **kwargs) -> None: - super(ChargesListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py deleted file mode 100644 index 42724a3aa6c6..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentSpend(Model): - """The current amount of cost which is being tracked for a budget. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar amount: The total amount of cost which is being tracked by the - budget. - :vartype amount: decimal.Decimal - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str - """ - - _validation = { - 'amount': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'amount': {'key': 'amount', 'type': 'decimal'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CurrentSpend, self).__init__(**kwargs) - self.amount = None - self.unit = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py deleted file mode 100644 index 87a5fc0bcc1d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CurrentSpend(Model): - """The current amount of cost which is being tracked for a budget. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar amount: The total amount of cost which is being tracked by the - budget. - :vartype amount: decimal.Decimal - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str - """ - - _validation = { - 'amount': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'amount': {'key': 'amount', 'type': 'decimal'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CurrentSpend, self).__init__(**kwargs) - self.amount = None - self.unit = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details.py deleted file mode 100644 index 03f3e23d2153..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """The details of the error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details_py3.py deleted file mode 100644 index f9e1adeac9fe..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_details_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """The details of the error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response.py deleted file mode 100644 index 4bd88fdd8421..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.consumption.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response_py3.py deleted file mode 100644 index 7ee8c9325c20..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/error_response_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.consumption.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py deleted file mode 100644 index 42c5f41c6412..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Filters(Model): - """May be used to filter budgets by resource group, resource, or meter. - - :param resource_groups: The list of filters on resource groups, allowed at - subscription level only. - :type resource_groups: list[str] - :param resources: The list of filters on resources. - :type resources: list[str] - :param meters: The list of filters on meters (GUID), mandatory for budgets - of usage category. - :type meters: list[str] - :param tags: The dictionary of filters on tags. - :type tags: dict[str, list[str]] - """ - - _validation = { - 'resource_groups': {'max_items': 10, 'min_items': 0}, - 'resources': {'max_items': 10, 'min_items': 0}, - 'meters': {'max_items': 10, 'min_items': 0}, - } - - _attribute_map = { - 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'meters': {'key': 'meters', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{[str]}'}, - } - - def __init__(self, **kwargs): - super(Filters, self).__init__(**kwargs) - self.resource_groups = kwargs.get('resource_groups', None) - self.resources = kwargs.get('resources', None) - self.meters = kwargs.get('meters', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py deleted file mode 100644 index c478858ccf1b..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Filters(Model): - """May be used to filter budgets by resource group, resource, or meter. - - :param resource_groups: The list of filters on resource groups, allowed at - subscription level only. - :type resource_groups: list[str] - :param resources: The list of filters on resources. - :type resources: list[str] - :param meters: The list of filters on meters (GUID), mandatory for budgets - of usage category. - :type meters: list[str] - :param tags: The dictionary of filters on tags. - :type tags: dict[str, list[str]] - """ - - _validation = { - 'resource_groups': {'max_items': 10, 'min_items': 0}, - 'resources': {'max_items': 10, 'min_items': 0}, - 'meters': {'max_items': 10, 'min_items': 0}, - } - - _attribute_map = { - 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'meters': {'key': 'meters', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{[str]}'}, - } - - def __init__(self, *, resource_groups=None, resources=None, meters=None, tags=None, **kwargs) -> None: - super(Filters, self).__init__(**kwargs) - self.resource_groups = resource_groups - self.resources = resources - self.meters = meters - self.tags = tags diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py deleted file mode 100644 index 4cfb731f0b17..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Forecast(Resource): - """A forecast resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar usage_date: The usage date of the forecast. - :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: - 'Daily', 'Monthly', 'Yearly' - :type grain: str or ~azure.mgmt.consumption.models.Grain - :ivar charge: The amount of charge - :vartype charge: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param charge_type: The type of the charge. Could be actual or forecast. - Possible values include: 'Actual', 'Forecast' - :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType - :ivar confidence_levels: The details about the forecast confidence levels. - This is populated only when chargeType is Forecast. - :vartype confidence_levels: - list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'charge': {'readonly': True}, - 'currency': {'readonly': True}, - 'confidence_levels': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, - 'grain': {'key': 'properties.grain', 'type': 'str'}, - 'charge': {'key': 'properties.charge', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, - } - - def __init__(self, **kwargs): - super(Forecast, self).__init__(**kwargs) - self.usage_date = None - self.grain = kwargs.get('grain', None) - self.charge = None - self.currency = None - self.charge_type = kwargs.get('charge_type', None) - self.confidence_levels = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py deleted file mode 100644 index 68cef39c6140..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ForecastPaged(Paged): - """ - A paging container for iterating over a list of :class:`Forecast ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Forecast]'} - } - - def __init__(self, *args, **kwargs): - - super(ForecastPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py deleted file mode 100644 index 803026660dd3..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ForecastPropertiesConfidenceLevelsItem(Model): - """ForecastPropertiesConfidenceLevelsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar percentage: The percentage level of the confidence - :vartype percentage: decimal.Decimal - :param bound: The boundary of the percentage, values could be 'Upper' or - 'Lower'. Possible values include: 'Upper', 'Lower' - :type bound: str or ~azure.mgmt.consumption.models.Bound - :ivar value: The amount of forecast within the percentage level - :vartype value: decimal.Decimal - """ - - _validation = { - 'percentage': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'percentage': {'key': 'percentage', 'type': 'decimal'}, - 'bound': {'key': 'bound', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) - self.percentage = None - self.bound = kwargs.get('bound', None) - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py deleted file mode 100644 index ddbe8d8bb5df..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ForecastPropertiesConfidenceLevelsItem(Model): - """ForecastPropertiesConfidenceLevelsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar percentage: The percentage level of the confidence - :vartype percentage: decimal.Decimal - :param bound: The boundary of the percentage, values could be 'Upper' or - 'Lower'. Possible values include: 'Upper', 'Lower' - :type bound: str or ~azure.mgmt.consumption.models.Bound - :ivar value: The amount of forecast within the percentage level - :vartype value: decimal.Decimal - """ - - _validation = { - 'percentage': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'percentage': {'key': 'percentage', 'type': 'decimal'}, - 'bound': {'key': 'bound', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, *, bound=None, **kwargs) -> None: - super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) - self.percentage = None - self.bound = bound - self.value = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py deleted file mode 100644 index ea3f5550f507..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Forecast(Resource): - """A forecast resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar usage_date: The usage date of the forecast. - :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: - 'Daily', 'Monthly', 'Yearly' - :type grain: str or ~azure.mgmt.consumption.models.Grain - :ivar charge: The amount of charge - :vartype charge: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param charge_type: The type of the charge. Could be actual or forecast. - Possible values include: 'Actual', 'Forecast' - :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType - :ivar confidence_levels: The details about the forecast confidence levels. - This is populated only when chargeType is Forecast. - :vartype confidence_levels: - list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'charge': {'readonly': True}, - 'currency': {'readonly': True}, - 'confidence_levels': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, - 'grain': {'key': 'properties.grain', 'type': 'str'}, - 'charge': {'key': 'properties.charge', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, - } - - def __init__(self, *, grain=None, charge_type=None, **kwargs) -> None: - super(Forecast, self).__init__(**kwargs) - self.usage_date = None - self.grain = grain - self.charge = None - self.currency = None - self.charge_type = charge_type - self.confidence_levels = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py deleted file mode 100644 index d44e542a0468..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ManagementGroupAggregatedCostResult(Resource): - """A management group aggregated cost resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - aggregated cost belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by aggregated - cost. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the aggregated - cost. - :vartype usage_end: datetime - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed Separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param children: Children of a management group - :type children: - list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] - :param included_subscriptions: List of subscription Guids included in the - calculation of aggregated cost - :type included_subscriptions: list[str] - :param excluded_subscriptions: List of subscription Guids excluded from - the calculation of aggregated cost - :type excluded_subscriptions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, - 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, - 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.marketplace_charges = None - self.charges_billed_separately = None - self.currency = None - self.children = kwargs.get('children', None) - self.included_subscriptions = kwargs.get('included_subscriptions', None) - self.excluded_subscriptions = kwargs.get('excluded_subscriptions', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py deleted file mode 100644 index efd01f65232e..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ManagementGroupAggregatedCostResult(Resource): - """A management group aggregated cost resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - aggregated cost belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by aggregated - cost. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the aggregated - cost. - :vartype usage_end: datetime - :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal - :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed Separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param children: Children of a management group - :type children: - list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] - :param included_subscriptions: List of subscription Guids included in the - calculation of aggregated cost - :type included_subscriptions: list[str] - :param excluded_subscriptions: List of subscription Guids excluded from - the calculation of aggregated cost - :type excluded_subscriptions: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'azure_charges': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'currency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, - 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, - 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, - } - - def __init__(self, *, children=None, included_subscriptions=None, excluded_subscriptions=None, **kwargs) -> None: - super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.azure_charges = None - self.marketplace_charges = None - self.charges_billed_separately = None - self.currency = None - self.children = children - self.included_subscriptions = included_subscriptions - self.excluded_subscriptions = excluded_subscriptions diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py deleted file mode 100644 index 638fba19f244..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Marketplace(Resource): - """An marketplace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar resource_rate: The marketplace resource rate. - :vartype resource_rate: decimal.Decimal - :ivar offer_name: The type of offer. - :vartype offer_name: str - :ivar resource_group: The name of resource group. - :vartype resource_group: str - :ivar order_number: The order number. - :vartype order_number: str - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar consumed_quantity: The quantity of usage. - :vartype consumed_quantity: decimal.Decimal - :ivar unit_of_measure: The unit of measure. - :vartype unit_of_measure: str - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - :ivar publisher_name: The name of publisher. - :vartype publisher_name: str - :ivar plan_name: The name of plan. - :vartype plan_name: str - :ivar is_recurring_charge: Flag indicating whether this is a recurring - charge or not. - :vartype is_recurring_charge: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'resource_rate': {'readonly': True}, - 'offer_name': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'order_number': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'currency': {'readonly': True}, - 'consumed_quantity': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'additional_properties': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'is_recurring_charge': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, - 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, - 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(Marketplace, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.resource_rate = None - self.offer_name = None - self.resource_group = None - self.order_number = None - self.instance_name = None - self.instance_id = None - self.currency = None - self.consumed_quantity = None - self.unit_of_measure = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.consumed_service = None - self.cost_center = None - self.additional_properties = None - self.publisher_name = None - self.plan_name = None - self.is_recurring_charge = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py deleted file mode 100644 index d360761aca55..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class MarketplacePaged(Paged): - """ - A paging container for iterating over a list of :class:`Marketplace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Marketplace]'} - } - - def __init__(self, *args, **kwargs): - - super(MarketplacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py deleted file mode 100644 index 776cec56d753..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Marketplace(Resource): - """An marketplace resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar resource_rate: The marketplace resource rate. - :vartype resource_rate: decimal.Decimal - :ivar offer_name: The type of offer. - :vartype offer_name: str - :ivar resource_group: The name of resource group. - :vartype resource_group: str - :ivar order_number: The order number. - :vartype order_number: str - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar consumed_quantity: The quantity of usage. - :vartype consumed_quantity: decimal.Decimal - :ivar unit_of_measure: The unit of measure. - :vartype unit_of_measure: str - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - :ivar publisher_name: The name of publisher. - :vartype publisher_name: str - :ivar plan_name: The name of plan. - :vartype plan_name: str - :ivar is_recurring_charge: Flag indicating whether this is a recurring - charge or not. - :vartype is_recurring_charge: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'resource_rate': {'readonly': True}, - 'offer_name': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'order_number': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'currency': {'readonly': True}, - 'consumed_quantity': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'additional_properties': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'is_recurring_charge': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, - 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, - 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(Marketplace, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.resource_rate = None - self.offer_name = None - self.resource_group = None - self.order_number = None - self.instance_name = None - self.instance_id = None - self.currency = None - self.consumed_quantity = None - self.unit_of_measure = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.consumed_service = None - self.cost_center = None - self.additional_properties = None - self.publisher_name = None - self.plan_name = None - self.is_recurring_charge = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py deleted file mode 100644 index c0cdb32756b0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetails(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit: The unit in which the meter consumption is charged, for - example, 'Hours', 'GB', etc. - :vartype unit: str - :ivar meter_location: The location in which the Azure service is - available. - :vartype meter_location: str - :ivar total_included_quantity: The total included quantity associated with - the offer. - :vartype total_included_quantity: decimal.Decimal - :ivar pretax_standard_rate: The pretax listing price. - :vartype pretax_standard_rate: decimal.Decimal - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar service_tier: The service tier. - :vartype service_tier: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_location': {'readonly': True}, - 'total_included_quantity': {'readonly': True}, - 'pretax_standard_rate': {'readonly': True}, - 'service_name': {'readonly': True}, - 'service_tier': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'meter_location': {'key': 'meterLocation', 'type': 'str'}, - 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, - 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'service_tier': {'key': 'serviceTier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MeterDetails, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit = None - self.meter_location = None - self.total_included_quantity = None - self.pretax_standard_rate = None - self.service_name = None - self.service_tier = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py deleted file mode 100644 index c7b6c8a43a47..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetails(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit: The unit in which the meter consumption is charged, for - example, 'Hours', 'GB', etc. - :vartype unit: str - :ivar meter_location: The location in which the Azure service is - available. - :vartype meter_location: str - :ivar total_included_quantity: The total included quantity associated with - the offer. - :vartype total_included_quantity: decimal.Decimal - :ivar pretax_standard_rate: The pretax listing price. - :vartype pretax_standard_rate: decimal.Decimal - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar service_tier: The service tier. - :vartype service_tier: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_location': {'readonly': True}, - 'total_included_quantity': {'readonly': True}, - 'pretax_standard_rate': {'readonly': True}, - 'service_name': {'readonly': True}, - 'service_tier': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'meter_location': {'key': 'meterLocation', 'type': 'str'}, - 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, - 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'service_tier': {'key': 'serviceTier', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MeterDetails, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit = None - self.meter_location = None - self.total_included_quantity = None - self.pretax_standard_rate = None - self.service_name = None - self.service_tier = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response.py deleted file mode 100644 index 2b7625a1587d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetailsResponse(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit_of_measure: The unit in which the meter consumption is charged, - for example, 'Hours', 'GB', etc. - :vartype unit_of_measure: str - :ivar service_family: The service family. - :vartype service_family: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'service_family': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'service_family': {'key': 'serviceFamily', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MeterDetailsResponse, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit_of_measure = None - self.service_family = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response_py3.py deleted file mode 100644 index 37f55c450ded..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_response_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MeterDetailsResponse(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit_of_measure: The unit in which the meter consumption is charged, - for example, 'Hours', 'GB', etc. - :vartype unit_of_measure: str - :ivar service_family: The service family. - :vartype service_family: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'service_family': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'service_family': {'key': 'serviceFamily', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MeterDetailsResponse, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit_of_measure = None - self.service_family = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py deleted file mode 100644 index c50dc6aa4dc2..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Notification(Model): - """The notification associated with a budget. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. The notification is enabled or not. - :type enabled: bool - :param operator: Required. The comparison operator. Possible values - include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - :type operator: str or ~azure.mgmt.consumption.models.OperatorType - :param threshold: Required. Threshold value associated with a - notification. Notification is sent when the cost exceeded the threshold. - It is always percent and has to be between 0 and 1000. - :type threshold: decimal.Decimal - :param contact_emails: Required. Email addresses to send the budget - notification to when the threshold is exceeded. - :type contact_emails: list[str] - :param contact_roles: Contact roles to send the budget notification to - when the threshold is exceeded. - :type contact_roles: list[str] - :param contact_groups: Action groups to send the budget notification to - when the threshold is exceeded. - :type contact_groups: list[str] - """ - - _validation = { - 'enabled': {'required': True}, - 'operator': {'required': True}, - 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, - 'contact_groups': {'max_items': 50, 'min_items': 0}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'decimal'}, - 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, - 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, - 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(Notification, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.operator = kwargs.get('operator', None) - self.threshold = kwargs.get('threshold', None) - self.contact_emails = kwargs.get('contact_emails', None) - self.contact_roles = kwargs.get('contact_roles', None) - self.contact_groups = kwargs.get('contact_groups', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py deleted file mode 100644 index 6dfc794e2477..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Notification(Model): - """The notification associated with a budget. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. The notification is enabled or not. - :type enabled: bool - :param operator: Required. The comparison operator. Possible values - include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - :type operator: str or ~azure.mgmt.consumption.models.OperatorType - :param threshold: Required. Threshold value associated with a - notification. Notification is sent when the cost exceeded the threshold. - It is always percent and has to be between 0 and 1000. - :type threshold: decimal.Decimal - :param contact_emails: Required. Email addresses to send the budget - notification to when the threshold is exceeded. - :type contact_emails: list[str] - :param contact_roles: Contact roles to send the budget notification to - when the threshold is exceeded. - :type contact_roles: list[str] - :param contact_groups: Action groups to send the budget notification to - when the threshold is exceeded. - :type contact_groups: list[str] - """ - - _validation = { - 'enabled': {'required': True}, - 'operator': {'required': True}, - 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, - 'contact_groups': {'max_items': 50, 'min_items': 0}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'decimal'}, - 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, - 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, - 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, - } - - def __init__(self, *, enabled: bool, operator, threshold, contact_emails, contact_roles=None, contact_groups=None, **kwargs) -> None: - super(Notification, self).__init__(**kwargs) - self.enabled = enabled - self.operator = operator - self.threshold = threshold - self.contact_emails = contact_emails - self.contact_roles = contact_roles - self.contact_groups = contact_groups diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation.py deleted file mode 100644 index 4c9c35d9d03e..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Consumption REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.consumption.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display.py deleted file mode 100644 index 5a1143b805e0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.Consumption. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: UsageDetail, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display_py3.py deleted file mode 100644 index c5fe954f04a4..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_display_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.Consumption. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: UsageDetail, - etc. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_paged.py deleted file mode 100644 index 5d69a3bf3ca3..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_py3.py deleted file mode 100644 index 93b8aa1bebad..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/operation_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Consumption REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.consumption.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py deleted file mode 100644 index 7bf1bc6b770d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PriceSheetProperties(Model): - """The properties of the price sheet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar unit_of_measure: Unit of measure - :vartype unit_of_measure: str - :ivar included_quantity: Included quality for an offer - :vartype included_quantity: decimal.Decimal - :ivar part_number: Part Number - :vartype part_number: str - :ivar unit_price: Unit Price - :vartype unit_price: decimal.Decimal - :ivar currency_code: Currency Code - :vartype currency_code: str - :ivar offer_id: Offer Id - :vartype offer_id: str - """ - - _validation = { - 'billing_period_id': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'included_quantity': {'readonly': True}, - 'part_number': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'currency_code': {'readonly': True}, - 'offer_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, - 'part_number': {'key': 'partNumber', 'type': 'str'}, - 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'offer_id': {'key': 'offerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PriceSheetProperties, self).__init__(**kwargs) - self.billing_period_id = None - self.meter_id = None - self.meter_details = None - self.unit_of_measure = None - self.included_quantity = None - self.part_number = None - self.unit_price = None - self.currency_code = None - self.offer_id = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py deleted file mode 100644 index eef5a80d3d23..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class PriceSheetProperties(Model): - """The properties of the price sheet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar unit_of_measure: Unit of measure - :vartype unit_of_measure: str - :ivar included_quantity: Included quality for an offer - :vartype included_quantity: decimal.Decimal - :ivar part_number: Part Number - :vartype part_number: str - :ivar unit_price: Unit Price - :vartype unit_price: decimal.Decimal - :ivar currency_code: Currency Code - :vartype currency_code: str - :ivar offer_id: Offer Id - :vartype offer_id: str - """ - - _validation = { - 'billing_period_id': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'included_quantity': {'readonly': True}, - 'part_number': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'currency_code': {'readonly': True}, - 'offer_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, - 'part_number': {'key': 'partNumber', 'type': 'str'}, - 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'offer_id': {'key': 'offerId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PriceSheetProperties, self).__init__(**kwargs) - self.billing_period_id = None - self.meter_id = None - self.meter_details = None - self.unit_of_measure = None - self.included_quantity = None - self.part_number = None - self.unit_price = None - self.currency_code = None - self.offer_id = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py deleted file mode 100644 index e4b536b687b7..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class PriceSheetResult(Resource): - """An pricesheet resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar pricesheets: Price sheet - :vartype pricesheets: - list[~azure.mgmt.consumption.models.PriceSheetProperties] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'pricesheets': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PriceSheetResult, self).__init__(**kwargs) - self.pricesheets = None - self.next_link = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py deleted file mode 100644 index aef94bda9c36..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class PriceSheetResult(Resource): - """An pricesheet resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar pricesheets: Price sheet - :vartype pricesheets: - list[~azure.mgmt.consumption.models.PriceSheetProperties] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'pricesheets': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PriceSheetResult, self).__init__(**kwargs) - self.pricesheets = None - self.next_link = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource.py deleted file mode 100644 index fd2230311017..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProxyResource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = kwargs.get('e_tag', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource_py3.py deleted file mode 100644 index 7fc6bf7e970c..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/proxy_resource_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ProxyResource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, e_tag: str=None, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.e_tag = e_tag diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py deleted file mode 100644 index 434326f37c82..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ReservationDetail(Resource): - """reservation detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved for the day. E.g. - if reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days. - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: The date on which consumption occurred. - :vartype usage_date: datetime - :ivar used_hours: This is the total hours used by the instance. - :vartype used_hours: decimal.Decimal - :ivar instance_id: This identifier is the name of the resource or the - fully qualified Resource ID. - :vartype instance_id: str - :ivar total_reserved_quantity: This is the total count of instances that - are reserved for the reservationId. - :vartype total_reserved_quantity: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'total_reserved_quantity': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ReservationDetail, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.instance_id = None - self.total_reserved_quantity = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py deleted file mode 100644 index 5b596c3df721..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReservationDetailPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationDetail ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationDetail]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationDetailPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py deleted file mode 100644 index b88fccac1663..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ReservationDetail(Resource): - """reservation detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved for the day. E.g. - if reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days. - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: The date on which consumption occurred. - :vartype usage_date: datetime - :ivar used_hours: This is the total hours used by the instance. - :vartype used_hours: decimal.Decimal - :ivar instance_id: This identifier is the name of the resource or the - fully qualified Resource ID. - :vartype instance_id: str - :ivar total_reserved_quantity: This is the total count of instances that - are reserved for the reservationId. - :vartype total_reserved_quantity: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'total_reserved_quantity': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationDetail, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.instance_id = None - self.total_reserved_quantity = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py deleted file mode 100644 index 45a36151f6f8..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationRecommendation(Model): - """Reservation recommendation resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - :ivar look_back_period: The number of days of usage to look back for - recommendation. - :vartype look_back_period: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar term: RI recommendations in one or three year terms. - :vartype term: str - :ivar cost_with_no_reserved_instances: The total amount of cost without - reserved instances. - :vartype cost_with_no_reserved_instances: decimal.Decimal - :ivar recommended_quantity: Recommended quality for reserved instances. - :vartype recommended_quantity: decimal.Decimal - :ivar total_cost_with_reserved_instances: The total amount of cost with - reserved instances. - :vartype total_cost_with_reserved_instances: decimal.Decimal - :ivar net_savings: Total estimated savings with reserved instances. - :vartype net_savings: decimal.Decimal - :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: datetime - :ivar scope: Shared or single recommendation. - :vartype scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - 'look_back_period': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'term': {'readonly': True}, - 'cost_with_no_reserved_instances': {'readonly': True}, - 'recommended_quantity': {'readonly': True}, - 'total_cost_with_reserved_instances': {'readonly': True}, - 'net_savings': {'readonly': True}, - 'first_usage_date': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, - 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, - 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, - 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReservationRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None - self.location = None - self.sku = None - self.look_back_period = None - self.meter_id = None - self.term = None - self.cost_with_no_reserved_instances = None - self.recommended_quantity = None - self.total_cost_with_reserved_instances = None - self.net_savings = None - self.first_usage_date = None - self.scope = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py deleted file mode 100644 index db7d155ade36..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReservationRecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationRecommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationRecommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationRecommendationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py deleted file mode 100644 index 267d8195d4a1..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ReservationRecommendation(Model): - """Reservation recommendation resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - :ivar look_back_period: The number of days of usage to look back for - recommendation. - :vartype look_back_period: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar term: RI recommendations in one or three year terms. - :vartype term: str - :ivar cost_with_no_reserved_instances: The total amount of cost without - reserved instances. - :vartype cost_with_no_reserved_instances: decimal.Decimal - :ivar recommended_quantity: Recommended quality for reserved instances. - :vartype recommended_quantity: decimal.Decimal - :ivar total_cost_with_reserved_instances: The total amount of cost with - reserved instances. - :vartype total_cost_with_reserved_instances: decimal.Decimal - :ivar net_savings: Total estimated savings with reserved instances. - :vartype net_savings: decimal.Decimal - :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: datetime - :ivar scope: Shared or single recommendation. - :vartype scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - 'look_back_period': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'term': {'readonly': True}, - 'cost_with_no_reserved_instances': {'readonly': True}, - 'recommended_quantity': {'readonly': True}, - 'total_cost_with_reserved_instances': {'readonly': True}, - 'net_savings': {'readonly': True}, - 'first_usage_date': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, - 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, - 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, - 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None - self.location = None - self.sku = None - self.look_back_period = None - self.meter_id = None - self.term = None - self.cost_with_no_reserved_instances = None - self.recommended_quantity = None - self.total_cost_with_reserved_instances = None - self.net_savings = None - self.first_usage_date = None - self.scope = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py deleted file mode 100644 index 3d60ffb73ba0..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ReservationSummary(Resource): - """reservation summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved. E.g. if - reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: Data corresponding to the utilization record. If the - grain of data is monthly, it will be first day of month. - :vartype usage_date: datetime - :ivar used_hours: Total used hours by the reservation - :vartype used_hours: decimal.Decimal - :ivar min_utilization_percentage: This is the minimum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field - will return 10% for that day - :vartype min_utilization_percentage: decimal.Decimal - :ivar avg_utilization_percentage: This is average utilization for the - entire time range. (day or month depending on the grain) - :vartype avg_utilization_percentage: decimal.Decimal - :ivar max_utilization_percentage: This is the maximum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field - will return 100% for that day. - :vartype max_utilization_percentage: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'min_utilization_percentage': {'readonly': True}, - 'avg_utilization_percentage': {'readonly': True}, - 'max_utilization_percentage': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, - 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, - 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ReservationSummary, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.min_utilization_percentage = None - self.avg_utilization_percentage = None - self.max_utilization_percentage = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py deleted file mode 100644 index 5b2e1ee931ae..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class ReservationSummaryPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationSummary ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationSummary]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationSummaryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py deleted file mode 100644 index 45d46e82b876..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ReservationSummary(Resource): - """reservation summary resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved. E.g. if - reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: Data corresponding to the utilization record. If the - grain of data is monthly, it will be first day of month. - :vartype usage_date: datetime - :ivar used_hours: Total used hours by the reservation - :vartype used_hours: decimal.Decimal - :ivar min_utilization_percentage: This is the minimum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field - will return 10% for that day - :vartype min_utilization_percentage: decimal.Decimal - :ivar avg_utilization_percentage: This is average utilization for the - entire time range. (day or month depending on the grain) - :vartype avg_utilization_percentage: decimal.Decimal - :ivar max_utilization_percentage: This is the maximum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field - will return 100% for that day. - :vartype max_utilization_percentage: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'min_utilization_percentage': {'readonly': True}, - 'avg_utilization_percentage': {'readonly': True}, - 'max_utilization_percentage': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, - 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, - 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationSummary, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.min_utilization_percentage = None - self.avg_utilization_percentage = None - self.max_utilization_percentage = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource.py deleted file mode 100644 index 08e36f3f8091..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py deleted file mode 100644 index fa0c45ddf7a8..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceAttributes(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - """ - - _validation = { - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceAttributes, self).__init__(**kwargs) - self.location = None - self.sku = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py deleted file mode 100644 index 273cab9005d4..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceAttributes(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - """ - - _validation = { - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceAttributes, self).__init__(**kwargs) - self.location = None - self.sku = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_py3.py deleted file mode 100644 index 38b4ca3ee6af..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py deleted file mode 100644 index fca156d8312c..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Tag(Model): - """The tag resource. - - :param key: Tag key. - :type key: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, **kwargs) -> None: - super(Tag, self).__init__(**kwargs) - self.key = key diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py deleted file mode 100644 index b202a33c77de..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource import ProxyResource - - -class TagsResult(ProxyResource): - """A resource listing all tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param tags: A list of Tag. - :type tags: list[~azure.mgmt.consumption.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, **kwargs): - super(TagsResult, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py deleted file mode 100644 index e817c5180ccc..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .proxy_resource_py3 import ProxyResource - - -class TagsResult(ProxyResource): - """A resource listing all tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param tags: A list of Tag. - :type tags: list[~azure.mgmt.consumption.models.Tag] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, - } - - def __init__(self, *, e_tag: str=None, tags=None, **kwargs) -> None: - super(TagsResult, self).__init__(e_tag=e_tag, **kwargs) - self.tags = tags diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py deleted file mode 100644 index 46fc3c6ae87b..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py +++ /dev/null @@ -1,279 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class UsageDetail(Resource): - """An usage detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_account_id: Billing Account identifier. - :vartype billing_account_id: str - :ivar billing_account_name: Billing Account Name. - :vartype billing_account_name: str - :ivar billing_period_start_date: The billing period start date. - :vartype billing_period_start_date: datetime - :ivar billing_period_end_date: The billing period end date. - :vartype billing_period_end_date: datetime - :ivar billing_profile_id: Billing Profile identifier. - :vartype billing_profile_id: str - :ivar billing_profile_name: Billing Profile Name. - :vartype billing_profile_name: str - :ivar account_owner_id: Account Owner Id. - :vartype account_owner_id: str - :ivar account_name: Account Name. - :vartype account_name: str - :ivar subscription_id: Subscription guid. - :vartype subscription_id: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar date_property: Date for the usage record. - :vartype date_property: datetime - :ivar product: Product name for the consumed service or purchase. Not - available for Marketplace. - :vartype product: str - :ivar part_number: Part Number of the service used. Can be used to join - with the price sheet. Not available for marketplace. - :vartype part_number: str - :ivar meter_id: The meter id (GUID). Not available for marketplace. For - reserved instance this represents the primary meter for which the - reservation was purchased. For the actual VM Size for which the - reservation is purchased see productOrderName. - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: - ~azure.mgmt.consumption.models.MeterDetailsResponse - :ivar quantity: The usage quantity. - :vartype quantity: decimal.Decimal - :ivar effective_price: Effective Price that’s charged for the usage. - :vartype effective_price: decimal.Decimal - :ivar cost: The amount of cost before tax. - :vartype cost: decimal.Decimal - :ivar unit_price: Unit Price is the price applicable to you. (your EA or - other contract price). - :vartype unit_price: decimal.Decimal - :ivar billing_currency: Billing Currency. - :vartype billing_currency: str - :ivar resource_location: Resource Location. - :vartype resource_location: str - :ivar consumed_service: Consumed service name. Name of the azure resource - provider that emits the usage or was purchased. This value is not provided - for marketplace usage. - :vartype consumed_service: str - :ivar resource_id: Azure resource manager resource identifier. - :vartype resource_id: str - :ivar resource_name: Resource Name. - :vartype resource_name: str - :ivar service_info1: Service Info 1. - :vartype service_info1: str - :ivar service_info2: Service Info 2. - :vartype service_info2: str - :ivar additional_info: Additional details of this usage item. By default - this is not populated, unless it's specified in $expand. Use this field to - get usage line item specific details such as the actual VM Size - (ServiceType) or the ratio in which the reservation discount is applied. - :vartype additional_info: str - :ivar invoice_section: Invoice Section Name. - :vartype invoice_section: str - :ivar cost_center: The cost center of this department if it is a - department and a cost center is provided. - :vartype cost_center: str - :ivar resource_group: Resource Group Name. - :vartype resource_group: str - :ivar reservation_id: ARM resource id of the reservation. Only applies to - records relevant to reservations. - :vartype reservation_id: str - :ivar reservation_name: User provided display name of the reservation. - Last known name for a particular day is populated in the daily data. Only - applies to records relevant to reservations. - :vartype reservation_name: str - :ivar product_order_id: Product Order Id. For reservations this is the - Reservation Order ID. - :vartype product_order_id: str - :ivar product_order_name: Product Order Name. For reservations this is the - SKU that was purchased. - :vartype product_order_name: str - :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. - :vartype offer_id: str - :ivar is_azure_credit_eligible: Is Azure Credit Eligible. - :vartype is_azure_credit_eligible: bool - :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 - months for a 1 year reservation. 36 months for a 3 year reservation. - :vartype term: str - :ivar publisher_name: Publisher Name. - :vartype publisher_name: str - :ivar publisher_type: Publisher Type. - :vartype publisher_type: str - :ivar plan_name: Plan Name. - :vartype plan_name: str - :ivar charge_type: Indicates a charge represents credits, usage, a - Marketplace purchase, a reservation fee, or a refund. - :vartype charge_type: str - :ivar frequency: Indicates how frequently this charge will occur. OneTime - for purchases which only happen once, Monthly for fees which recur every - month, and UsageBased for charges based on how much a service is used. - :vartype frequency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_account_id': {'readonly': True}, - 'billing_account_name': {'readonly': True}, - 'billing_period_start_date': {'readonly': True}, - 'billing_period_end_date': {'readonly': True}, - 'billing_profile_id': {'readonly': True}, - 'billing_profile_name': {'readonly': True}, - 'account_owner_id': {'readonly': True}, - 'account_name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'date_property': {'readonly': True}, - 'product': {'readonly': True}, - 'part_number': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'quantity': {'readonly': True}, - 'effective_price': {'readonly': True}, - 'cost': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'billing_currency': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'service_info1': {'readonly': True}, - 'service_info2': {'readonly': True}, - 'additional_info': {'readonly': True}, - 'invoice_section': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'reservation_name': {'readonly': True}, - 'product_order_id': {'readonly': True}, - 'product_order_name': {'readonly': True}, - 'offer_id': {'readonly': True}, - 'is_azure_credit_eligible': {'readonly': True}, - 'term': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'publisher_type': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'charge_type': {'readonly': True}, - 'frequency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, - 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, - 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, - 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, - 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, - 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, - 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, - 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, - 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, - 'cost': {'key': 'properties.cost', 'type': 'decimal'}, - 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, - 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, - 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, - 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, - 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, - 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, - 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, - 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, - 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, - 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, - 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'frequency': {'key': 'properties.frequency', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageDetail, self).__init__(**kwargs) - self.billing_account_id = None - self.billing_account_name = None - self.billing_period_start_date = None - self.billing_period_end_date = None - self.billing_profile_id = None - self.billing_profile_name = None - self.account_owner_id = None - self.account_name = None - self.subscription_id = None - self.subscription_name = None - self.date_property = None - self.product = None - self.part_number = None - self.meter_id = None - self.meter_details = None - self.quantity = None - self.effective_price = None - self.cost = None - self.unit_price = None - self.billing_currency = None - self.resource_location = None - self.consumed_service = None - self.resource_id = None - self.resource_name = None - self.service_info1 = None - self.service_info2 = None - self.additional_info = None - self.invoice_section = None - self.cost_center = None - self.resource_group = None - self.reservation_id = None - self.reservation_name = None - self.product_order_id = None - self.product_order_name = None - self.offer_id = None - self.is_azure_credit_eligible = None - self.term = None - self.publisher_name = None - self.publisher_type = None - self.plan_name = None - self.charge_type = None - self.frequency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py deleted file mode 100644 index ae15d28a276e..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class UsageDetailPaged(Paged): - """ - A paging container for iterating over a list of :class:`UsageDetail ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UsageDetail]'} - } - - def __init__(self, *args, **kwargs): - - super(UsageDetailPaged, self).__init__(*args, **kwargs) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py deleted file mode 100644 index 131dadc0be5d..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py +++ /dev/null @@ -1,279 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class UsageDetail(Resource): - """An usage detail resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar billing_account_id: Billing Account identifier. - :vartype billing_account_id: str - :ivar billing_account_name: Billing Account Name. - :vartype billing_account_name: str - :ivar billing_period_start_date: The billing period start date. - :vartype billing_period_start_date: datetime - :ivar billing_period_end_date: The billing period end date. - :vartype billing_period_end_date: datetime - :ivar billing_profile_id: Billing Profile identifier. - :vartype billing_profile_id: str - :ivar billing_profile_name: Billing Profile Name. - :vartype billing_profile_name: str - :ivar account_owner_id: Account Owner Id. - :vartype account_owner_id: str - :ivar account_name: Account Name. - :vartype account_name: str - :ivar subscription_id: Subscription guid. - :vartype subscription_id: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar date_property: Date for the usage record. - :vartype date_property: datetime - :ivar product: Product name for the consumed service or purchase. Not - available for Marketplace. - :vartype product: str - :ivar part_number: Part Number of the service used. Can be used to join - with the price sheet. Not available for marketplace. - :vartype part_number: str - :ivar meter_id: The meter id (GUID). Not available for marketplace. For - reserved instance this represents the primary meter for which the - reservation was purchased. For the actual VM Size for which the - reservation is purchased see productOrderName. - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: - ~azure.mgmt.consumption.models.MeterDetailsResponse - :ivar quantity: The usage quantity. - :vartype quantity: decimal.Decimal - :ivar effective_price: Effective Price that’s charged for the usage. - :vartype effective_price: decimal.Decimal - :ivar cost: The amount of cost before tax. - :vartype cost: decimal.Decimal - :ivar unit_price: Unit Price is the price applicable to you. (your EA or - other contract price). - :vartype unit_price: decimal.Decimal - :ivar billing_currency: Billing Currency. - :vartype billing_currency: str - :ivar resource_location: Resource Location. - :vartype resource_location: str - :ivar consumed_service: Consumed service name. Name of the azure resource - provider that emits the usage or was purchased. This value is not provided - for marketplace usage. - :vartype consumed_service: str - :ivar resource_id: Azure resource manager resource identifier. - :vartype resource_id: str - :ivar resource_name: Resource Name. - :vartype resource_name: str - :ivar service_info1: Service Info 1. - :vartype service_info1: str - :ivar service_info2: Service Info 2. - :vartype service_info2: str - :ivar additional_info: Additional details of this usage item. By default - this is not populated, unless it's specified in $expand. Use this field to - get usage line item specific details such as the actual VM Size - (ServiceType) or the ratio in which the reservation discount is applied. - :vartype additional_info: str - :ivar invoice_section: Invoice Section Name. - :vartype invoice_section: str - :ivar cost_center: The cost center of this department if it is a - department and a cost center is provided. - :vartype cost_center: str - :ivar resource_group: Resource Group Name. - :vartype resource_group: str - :ivar reservation_id: ARM resource id of the reservation. Only applies to - records relevant to reservations. - :vartype reservation_id: str - :ivar reservation_name: User provided display name of the reservation. - Last known name for a particular day is populated in the daily data. Only - applies to records relevant to reservations. - :vartype reservation_name: str - :ivar product_order_id: Product Order Id. For reservations this is the - Reservation Order ID. - :vartype product_order_id: str - :ivar product_order_name: Product Order Name. For reservations this is the - SKU that was purchased. - :vartype product_order_name: str - :ivar offer_id: Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. - :vartype offer_id: str - :ivar is_azure_credit_eligible: Is Azure Credit Eligible. - :vartype is_azure_credit_eligible: bool - :ivar term: Term (in months). 1 month for monthly recurring purchase. 12 - months for a 1 year reservation. 36 months for a 3 year reservation. - :vartype term: str - :ivar publisher_name: Publisher Name. - :vartype publisher_name: str - :ivar publisher_type: Publisher Type. - :vartype publisher_type: str - :ivar plan_name: Plan Name. - :vartype plan_name: str - :ivar charge_type: Indicates a charge represents credits, usage, a - Marketplace purchase, a reservation fee, or a refund. - :vartype charge_type: str - :ivar frequency: Indicates how frequently this charge will occur. OneTime - for purchases which only happen once, Monthly for fees which recur every - month, and UsageBased for charges based on how much a service is used. - :vartype frequency: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_account_id': {'readonly': True}, - 'billing_account_name': {'readonly': True}, - 'billing_period_start_date': {'readonly': True}, - 'billing_period_end_date': {'readonly': True}, - 'billing_profile_id': {'readonly': True}, - 'billing_profile_name': {'readonly': True}, - 'account_owner_id': {'readonly': True}, - 'account_name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'date_property': {'readonly': True}, - 'product': {'readonly': True}, - 'part_number': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'quantity': {'readonly': True}, - 'effective_price': {'readonly': True}, - 'cost': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'billing_currency': {'readonly': True}, - 'resource_location': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'resource_name': {'readonly': True}, - 'service_info1': {'readonly': True}, - 'service_info2': {'readonly': True}, - 'additional_info': {'readonly': True}, - 'invoice_section': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'reservation_name': {'readonly': True}, - 'product_order_id': {'readonly': True}, - 'product_order_name': {'readonly': True}, - 'offer_id': {'readonly': True}, - 'is_azure_credit_eligible': {'readonly': True}, - 'term': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'publisher_type': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'charge_type': {'readonly': True}, - 'frequency': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, - 'billing_account_name': {'key': 'properties.billingAccountName', 'type': 'str'}, - 'billing_period_start_date': {'key': 'properties.billingPeriodStartDate', 'type': 'iso-8601'}, - 'billing_period_end_date': {'key': 'properties.billingPeriodEndDate', 'type': 'iso-8601'}, - 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, - 'billing_profile_name': {'key': 'properties.billingProfileName', 'type': 'str'}, - 'account_owner_id': {'key': 'properties.accountOwnerId', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'date_property': {'key': 'properties.date', 'type': 'iso-8601'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetailsResponse'}, - 'quantity': {'key': 'properties.quantity', 'type': 'decimal'}, - 'effective_price': {'key': 'properties.effectivePrice', 'type': 'decimal'}, - 'cost': {'key': 'properties.cost', 'type': 'decimal'}, - 'unit_price': {'key': 'properties.unitPrice', 'type': 'decimal'}, - 'billing_currency': {'key': 'properties.billingCurrency', 'type': 'str'}, - 'resource_location': {'key': 'properties.resourceLocation', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, - 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, - 'service_info1': {'key': 'properties.serviceInfo1', 'type': 'str'}, - 'service_info2': {'key': 'properties.serviceInfo2', 'type': 'str'}, - 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, - 'invoice_section': {'key': 'properties.invoiceSection', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'reservation_name': {'key': 'properties.reservationName', 'type': 'str'}, - 'product_order_id': {'key': 'properties.productOrderId', 'type': 'str'}, - 'product_order_name': {'key': 'properties.productOrderName', 'type': 'str'}, - 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, - 'is_azure_credit_eligible': {'key': 'properties.isAzureCreditEligible', 'type': 'bool'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'publisher_type': {'key': 'properties.publisherType', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'frequency': {'key': 'properties.frequency', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UsageDetail, self).__init__(**kwargs) - self.billing_account_id = None - self.billing_account_name = None - self.billing_period_start_date = None - self.billing_period_end_date = None - self.billing_profile_id = None - self.billing_profile_name = None - self.account_owner_id = None - self.account_name = None - self.subscription_id = None - self.subscription_name = None - self.date_property = None - self.product = None - self.part_number = None - self.meter_id = None - self.meter_details = None - self.quantity = None - self.effective_price = None - self.cost = None - self.unit_price = None - self.billing_currency = None - self.resource_location = None - self.consumed_service = None - self.resource_id = None - self.resource_name = None - self.service_info1 = None - self.service_info2 = None - self.additional_info = None - self.invoice_section = None - self.cost_center = None - self.resource_group = None - self.reservation_id = None - self.reservation_name = None - self.product_order_id = None - self.product_order_name = None - self.offer_id = None - self.is_azure_credit_eligible = None - self.term = None - self.publisher_name = None - self.publisher_type = None - self.plan_name = None - self.charge_type = None - self.frequency = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response.py deleted file mode 100644 index c009f116b3c7..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class UsageDetailsDownloadResponse(Resource): - """Download response of Usage Details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar download_url: The URL to the csv file. - :vartype download_url: str - :ivar valid_till: The time in UTC at which this download URL will expire. - :vartype valid_till: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'download_url': {'readonly': True}, - 'valid_till': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, - 'valid_till': {'key': 'properties.validTill', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageDetailsDownloadResponse, self).__init__(**kwargs) - self.download_url = None - self.valid_till = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response_py3.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response_py3.py deleted file mode 100644 index baaae11b4345..000000000000 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_details_download_response_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class UsageDetailsDownloadResponse(Resource): - """Download response of Usage Details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar download_url: The URL to the csv file. - :vartype download_url: str - :ivar valid_till: The time in UTC at which this download URL will expire. - :vartype valid_till: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'download_url': {'readonly': True}, - 'valid_till': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, - 'valid_till': {'key': 'properties.validTill', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UsageDetailsDownloadResponse, self).__init__(**kwargs) - self.download_url = None - self.valid_till = None diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py index f778b44f0171..b5bee300ad0a 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py @@ -9,19 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from .usage_details_operations import UsageDetailsOperations -from .marketplaces_operations import MarketplacesOperations -from .budgets_operations import BudgetsOperations -from .tags_operations import TagsOperations -from .charges_operations import ChargesOperations -from .balances_operations import BalancesOperations -from .reservations_summaries_operations import ReservationsSummariesOperations -from .reservations_details_operations import ReservationsDetailsOperations -from .reservation_recommendations_operations import ReservationRecommendationsOperations -from .price_sheet_operations import PriceSheetOperations -from .forecasts_operations import ForecastsOperations -from .operations import Operations -from .aggregated_cost_operations import AggregatedCostOperations +from ._usage_details_operations import UsageDetailsOperations +from ._marketplaces_operations import MarketplacesOperations +from ._budgets_operations import BudgetsOperations +from ._tags_operations import TagsOperations +from ._charges_operations import ChargesOperations +from ._balances_operations import BalancesOperations +from ._reservations_summaries_operations import ReservationsSummariesOperations +from ._reservations_details_operations import ReservationsDetailsOperations +from ._reservation_recommendations_operations import ReservationRecommendationsOperations +from ._reservation_transactions_operations import ReservationTransactionsOperations +from ._price_sheet_operations import PriceSheetOperations +from ._forecasts_operations import ForecastsOperations +from ._operations import Operations +from ._aggregated_cost_operations import AggregatedCostOperations +from ._events_operations import EventsOperations +from ._lots_operations import LotsOperations +from ._credits_operations import CreditsOperations __all__ = [ 'UsageDetailsOperations', @@ -33,8 +37,12 @@ 'ReservationsSummariesOperations', 'ReservationsDetailsOperations', 'ReservationRecommendationsOperations', + 'ReservationTransactionsOperations', 'PriceSheetOperations', 'ForecastsOperations', 'Operations', 'AggregatedCostOperations', + 'EventsOperations', + 'LotsOperations', + 'CreditsOperations', ] diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py similarity index 96% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py index 699821161f53..aa339979ffb5 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_aggregated_cost_operations.py @@ -18,11 +18,13 @@ class AggregatedCostOperations(object): """AggregatedCostOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -93,7 +95,6 @@ def get_by_management_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) @@ -156,7 +157,6 @@ def get_for_billing_period_by_management_group( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py similarity index 96% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py index ed6f60699c50..d01311595b5f 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_balances_operations.py @@ -18,11 +18,13 @@ class BalancesOperations(object): """BalancesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -83,7 +85,6 @@ def get_by_billing_account( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Balance', response) @@ -144,7 +145,6 @@ def get_for_billing_period_by_billing_account( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Balance', response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py similarity index 97% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py index 54a54997449f..4fc03f68513b 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_budgets_operations.py @@ -18,11 +18,13 @@ class BudgetsOperations(object): """BudgetsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -68,8 +70,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -98,6 +99,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -106,12 +112,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BudgetPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.BudgetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.BudgetPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets'} @@ -180,7 +184,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Budget', response) @@ -264,7 +267,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Budget', response) if response.status_code == 201: diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py similarity index 64% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py index afec159b31b1..8f42ce463875 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_charges_operations.py @@ -18,11 +18,13 @@ class ChargesOperations(object): """ChargesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,44 +34,62 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config - def list_by_scope( - self, scope, filter=None, custom_headers=None, raw=False, **operation_config): + def list( + self, scope, start_date=None, end_date=None, filter=None, apply=None, custom_headers=None, raw=False, **operation_config): """Lists the charges based for the defined scope. - :param scope: The scope associated with usage details operations. This + :param scope: The scope associated with charges operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope and + for Department scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + Also, Modern Commerce Account scopes are + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + billingAccount scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str :param filter: May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). :type filter: str + :param apply: May be used to group charges for billingAccount scope by + properties/billingProfileId, properties/invoiceSectionId, + properties/customerId (specific for Partner Led), or for + billingProfile scope by properties/invoiceSectionId. + :type apply: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ChargeSummary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.ChargeSummary or + :return: ChargesListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.ChargesListResult or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_scope.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } @@ -78,8 +98,14 @@ def list_by_scope( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if start_date is not None: + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + if end_date is not None: + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') if filter is not None: query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if apply is not None: + query_parameters['$apply'] = self._serialize.query("apply", apply, 'str') # Construct headers header_parameters = {} @@ -99,13 +125,12 @@ def list_by_scope( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ChargeSummary', response) + deserialized = self._deserialize('ChargesListResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/charges'} + list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/charges'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py new file mode 100644 index 000000000000..6a74e8cbc971 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_credits_operations.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class CreditsOperations(object): + """CreditsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-10-01. Constant value: "2019-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-10-01" + + self.config = config + + def get( + self, billing_account_id, billing_profile_id, custom_headers=None, raw=False, **operation_config): + """The credit summary by billingAccountId and billingProfileId. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_profile_id: Azure Billing Profile ID. + :type billing_profile_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CreditSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.CreditSummary or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CreditSummary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py new file mode 100644 index 000000000000..e86c87af6d63 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_events_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class EventsOperations(object): + """EventsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-10-01. Constant value: "2019-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-10-01" + + self.config = config + + def list( + self, billing_account_id, billing_profile_id, start_date, end_date, custom_headers=None, raw=False, **operation_config): + """Lists the events by billingAccountId and billingProfileId for given + start and end date. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_profile_id: Azure Billing Profile ID. + :type billing_profile_id: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EventSummary + :rtype: + ~azure.mgmt.consumption.models.EventSummaryPaged[~azure.mgmt.consumption.models.EventSummary] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.EventSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py similarity index 89% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py index c868e8e3586f..ba4ffae220a1 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_forecasts_operations.py @@ -18,11 +18,13 @@ class ForecastsOperations(object): """ForecastsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -56,8 +58,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -88,6 +89,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -96,12 +102,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ForecastPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ForecastPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ForecastPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py new file mode 100644 index 000000000000..cdfe19388643 --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_lots_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class LotsOperations(object): + """LotsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-10-01. Constant value: "2019-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-10-01" + + self.config = config + + def list( + self, billing_account_id, billing_profile_id, custom_headers=None, raw=False, **operation_config): + """Lists the lots by billingAccountId and billingProfileId. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_profile_id: Azure Billing Profile ID. + :type billing_profile_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of LotSummary + :rtype: + ~azure.mgmt.consumption.models.LotSummaryPaged[~azure.mgmt.consumption.models.LotSummary] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LotSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py similarity index 92% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py index b090d9105b19..870c07e8c866 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_marketplaces_operations.py @@ -18,11 +18,13 @@ class MarketplacesOperations(object): """MarketplacesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -84,8 +86,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -120,6 +121,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -128,12 +134,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MarketplacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.MarketplacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.MarketplacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/marketplaces'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py similarity index 87% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py index b271b1472121..08d4109bd356 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_operations.py @@ -18,11 +18,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Consumption/operations'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py similarity index 97% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py index edd7edfec9ee..95ccb24885e7 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_price_sheet_operations.py @@ -18,11 +18,13 @@ class PriceSheetOperations(object): """PriceSheetOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -99,7 +101,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PriceSheetResult', response) @@ -176,7 +177,6 @@ def get_by_billing_period( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('PriceSheetResult', response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py similarity index 75% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py index ba412e904860..2c0d91d30d1d 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_recommendations_operations.py @@ -18,11 +18,13 @@ class ReservationRecommendationsOperations(object): """ReservationRecommendationsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,14 +34,22 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): + self, scope, filter=None, custom_headers=None, raw=False, **operation_config): """List of recommendations for purchasing reserved instances. + :param scope: The scope associated with reservation recommendations + operations. This includes '/subscriptions/{subscriptionId}/' for + subscription scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + BillingAccount scope, and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope + :type scope: str :param filter: May be used to filter reservationRecommendations by properties/scope and properties/lookBackPeriod. :type filter: str @@ -54,13 +64,12 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } url = self._client.format_url(url, **path_format_arguments) @@ -86,6 +95,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -94,12 +108,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations'} + list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/reservationRecommendations'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py new file mode 100644 index 000000000000..60bf08dc545e --- /dev/null +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservation_transactions_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ReservationTransactionsOperations(object): + """ReservationTransactionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-10-01. Constant value: "2019-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-10-01" + + self.config = config + + def list( + self, billing_account_id, filter=None, custom_headers=None, raw=False, **operation_config): + """List of transactions for reserved instances on billing account scope. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param filter: Filter reservation transactions by date range. The + properties/UsageDate for start date and end date. The filter supports + 'le' and 'ge' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationTransaction + :rtype: + ~azure.mgmt.consumption.models.ReservationTransactionPaged[~azure.mgmt.consumption.models.ReservationTransaction] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationTransactionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py similarity index 61% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py index 9e36876afa25..01ca885dac3f 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_details_operations.py @@ -18,11 +18,13 @@ class ReservationsDetailsOperations(object): """ReservationsDetailsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -57,8 +59,7 @@ def list_by_reservation_order( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_reservation_order.metadata['url'] @@ -88,6 +89,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -96,12 +102,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails'} @@ -129,8 +133,7 @@ def list_by_reservation_order_and_reservation( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_reservation_order_and_reservation.metadata['url'] @@ -161,6 +164,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -169,12 +177,97 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails'} + + def list( + self, scope, start_date=None, end_date=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the reservations details for the defined scope and provided date + range. + + :param scope: The scope associated with reservations details + operations. This includes + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + BillingAccount scope (legacy), and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope (modern). + :type scope: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param filter: Filter reservation details by date range. The + properties/UsageDate for start date and end date. The filter supports + 'le' and 'ge' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationDetail + :rtype: + ~azure.mgmt.consumption.models.ReservationDetailPaged[~azure.mgmt.consumption.models.ReservationDetail] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if start_date is not None: + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + if end_date is not None: + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/reservationDetails'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py similarity index 62% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py index 3ec7d771804e..699a6d934303 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_reservations_summaries_operations.py @@ -18,11 +18,13 @@ class ReservationsSummariesOperations(object): """ReservationsSummariesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -59,8 +61,7 @@ def list_by_reservation_order( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_reservation_order.metadata['url'] @@ -92,6 +93,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -100,12 +106,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries'} @@ -135,8 +139,7 @@ def list_by_reservation_order_and_reservation( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_reservation_order_and_reservation.metadata['url'] @@ -169,6 +172,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -177,12 +185,100 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries'} + + def list( + self, scope, grain, start_date=None, end_date=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the reservations summaries for the defined scope daily or monthly + grain. + + :param scope: The scope associated with reservations summaries + operations. This includes + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + BillingAccount scope (legacy), and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for BillingProfile scope (modern). + :type scope: str + :param grain: Can be daily or monthly. Possible values include: + 'DailyGrain', 'MonthlyGrain' + :type grain: str or ~azure.mgmt.consumption.models.Datagrain + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param filter: Required only for daily grain. The properties/UsageDate + for start date and end date. The filter supports 'le' and 'ge' + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ReservationSummary + :rtype: + ~azure.mgmt.consumption.models.ReservationSummaryPaged[~azure.mgmt.consumption.models.ReservationSummary] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['grain'] = self._serialize.query("grain", grain, 'str') + if start_date is not None: + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + if end_date is not None: + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/reservationSummaries'} diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py similarity index 94% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py index bd200f98a583..9ab157ce79d7 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_tags_operations.py @@ -18,11 +18,13 @@ class TagsOperations(object): """TagsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -93,7 +95,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TagsResult', response) diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py similarity index 50% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py rename to sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py index 44fa3a96b4cd..8e09d115bdf9 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py +++ b/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/operations/_usage_details_operations.py @@ -11,8 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -20,11 +18,13 @@ class UsageDetailsOperations(object): """UsageDetailsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2019-04-01-preview. Constant value: "2019-04-01-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-10-01. Constant value: "2019-10-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-04-01-preview" + self.api_version = "2019-10-01" self.config = config @@ -45,8 +45,6 @@ def list( :param scope: The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for @@ -59,7 +57,16 @@ def list( billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + Also, Modern Commerce Account scopes are + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + billingAccount scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param expand: May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, @@ -67,10 +74,13 @@ def list( :type expand: str :param filter: May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, - properties/resourceId, properties/chargeType, properties/reservationId - or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. - It does not currently support 'ne', 'or', or 'not'. Tag filter is a - key value pair string where key and value is separated by a colon (:). + properties/resourceId, properties/chargeType, + properties/reservationId, properties/publisherType or tags. The filter + supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not + currently support 'ne', 'or', or 'not'. Tag filter is a key value pair + string where key and value is separated by a colon (:). PublisherType + Filter accepts two values azure and marketplace and it is currently + supported for Web Direct Offer Type :type filter: str :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink @@ -95,8 +105,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -135,6 +144,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -143,136 +157,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/usageDetails'} - - - def _download_initial( - self, scope, metric=None, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.download.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if metric is not None: - query_parameters['metric'] = self._serialize.query("metric", metric, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - header_dict = {} - - if response.status_code == 200: - deserialized = self._deserialize('UsageDetailsDownloadResponse', response) - header_dict = { - 'Location': 'str', - 'Retry-After': 'str', - 'Azure-AsyncOperation': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - def download( - self, scope, metric=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Download usage details data. - - :param scope: The scope associated with usage details operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/departments/{departmentId}' for - Department scope, - '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope. For subscription, billing account, - department, enrollment account and management group, you can also add - billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param metric: Allows to select different type of cost/usage records. - Possible values include: 'ActualCostMetricType', - 'AmortizedCostMetricType', 'UsageMetricType' - :type metric: str or ~azure.mgmt.consumption.models.Metrictype - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - UsageDetailsDownloadResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.consumption.models.UsageDetailsDownloadResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.consumption.models.UsageDetailsDownloadResponse]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._download_initial( - scope=scope, - metric=metric, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - header_dict = { - 'Location': 'str', - 'Retry-After': 'str', - 'Azure-AsyncOperation': 'str', - } - deserialized = self._deserialize('UsageDetailsDownloadResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - download.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/usageDetails/download'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db.py index eea6f9184e6d..d3f871755156 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db.py @@ -26,6 +26,11 @@ from .operations import CollectionPartitionOperations from .operations import PartitionKeyRangeIdOperations from .operations import PartitionKeyRangeIdRegionOperations +from .operations import SqlResourcesOperations +from .operations import MongoDBResourcesOperations +from .operations import TableResourcesOperations +from .operations import CassandraResourcesOperations +from .operations import GremlinResourcesOperations from . import models @@ -61,6 +66,16 @@ class CosmosDB(SDKClient): :vartype partition_key_range_id: azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdOperations :ivar partition_key_range_id_region: PartitionKeyRangeIdRegion operations :vartype partition_key_range_id_region: azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations + :ivar sql_resources: SqlResources operations + :vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations + :ivar mongo_db_resources: MongoDBResources operations + :vartype mongo_db_resources: azure.mgmt.cosmosdb.operations.MongoDBResourcesOperations + :ivar table_resources: TableResources operations + :vartype table_resources: azure.mgmt.cosmosdb.operations.TableResourcesOperations + :ivar cassandra_resources: CassandraResources operations + :vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations + :ivar gremlin_resources: GremlinResources operations + :vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -77,7 +92,7 @@ def __init__( super(CosmosDB, 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-04-08' + self.api_version = '2019-08-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -107,3 +122,13 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations( self._client, self.config, self._serialize, self._deserialize) + self.sql_resources = SqlResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.mongo_db_resources = MongoDBResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.table_resources = TableResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.cassandra_resources = CassandraResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.gremlin_resources = GremlinResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py index a7f22fd3cc55..a583503a43bd 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py @@ -10,23 +10,25 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import ARMProxyResource + from ._models_py3 import ARMResourceProperties from ._models_py3 import Capability - from ._models_py3 import CassandraKeyspace from ._models_py3 import CassandraKeyspaceCreateUpdateParameters + from ._models_py3 import CassandraKeyspaceGetResults from ._models_py3 import CassandraKeyspaceResource from ._models_py3 import CassandraPartitionKey from ._models_py3 import CassandraSchema - from ._models_py3 import CassandraTable from ._models_py3 import CassandraTableCreateUpdateParameters + from ._models_py3 import CassandraTableGetResults from ._models_py3 import CassandraTableResource from ._models_py3 import ClusterKey from ._models_py3 import Column from ._models_py3 import ConflictResolutionPolicy from ._models_py3 import ConsistencyPolicy from ._models_py3 import ContainerPartitionKey - from ._models_py3 import DatabaseAccount from ._models_py3 import DatabaseAccountConnectionString from ._models_py3 import DatabaseAccountCreateUpdateParameters + from ._models_py3 import DatabaseAccountGetResults from ._models_py3 import DatabaseAccountListConnectionStringsResult from ._models_py3 import DatabaseAccountListKeysResult from ._models_py3 import DatabaseAccountListReadOnlyKeysResult @@ -37,11 +39,11 @@ from ._models_py3 import ExtendedResourceProperties from ._models_py3 import FailoverPolicies from ._models_py3 import FailoverPolicy - from ._models_py3 import GremlinDatabase from ._models_py3 import GremlinDatabaseCreateUpdateParameters + from ._models_py3 import GremlinDatabaseGetResults from ._models_py3 import GremlinDatabaseResource - from ._models_py3 import GremlinGraph from ._models_py3 import GremlinGraphCreateUpdateParameters + from ._models_py3 import GremlinGraphGetResults from ._models_py3 import GremlinGraphResource from ._models_py3 import IncludedPath from ._models_py3 import Indexes @@ -52,11 +54,11 @@ from ._models_py3 import MetricDefinition from ._models_py3 import MetricName from ._models_py3 import MetricValue - from ._models_py3 import MongoDBCollection from ._models_py3 import MongoDBCollectionCreateUpdateParameters + from ._models_py3 import MongoDBCollectionGetResults from ._models_py3 import MongoDBCollectionResource - from ._models_py3 import MongoDBDatabase from ._models_py3 import MongoDBDatabaseCreateUpdateParameters + from ._models_py3 import MongoDBDatabaseGetResults from ._models_py3 import MongoDBDatabaseResource from ._models_py3 import MongoIndex from ._models_py3 import MongoIndexKeys @@ -68,41 +70,51 @@ from ._models_py3 import PercentileMetric from ._models_py3 import PercentileMetricValue from ._models_py3 import RegionForOnlineOffline - from ._models_py3 import Resource - from ._models_py3 import SqlContainer from ._models_py3 import SqlContainerCreateUpdateParameters + from ._models_py3 import SqlContainerGetResults from ._models_py3 import SqlContainerResource - from ._models_py3 import SqlDatabase from ._models_py3 import SqlDatabaseCreateUpdateParameters + from ._models_py3 import SqlDatabaseGetResults from ._models_py3 import SqlDatabaseResource - from ._models_py3 import Table + from ._models_py3 import SqlStoredProcedureCreateUpdateParameters + from ._models_py3 import SqlStoredProcedureGetResults + from ._models_py3 import SqlStoredProcedureResource + from ._models_py3 import SqlTriggerCreateUpdateParameters + from ._models_py3 import SqlTriggerGetResults + from ._models_py3 import SqlTriggerResource + from ._models_py3 import SqlUserDefinedFunctionCreateUpdateParameters + from ._models_py3 import SqlUserDefinedFunctionGetResults + from ._models_py3 import SqlUserDefinedFunctionResource from ._models_py3 import TableCreateUpdateParameters + from ._models_py3 import TableGetResults from ._models_py3 import TableResource - from ._models_py3 import Throughput - from ._models_py3 import ThroughputResource - from ._models_py3 import ThroughputUpdateParameters + from ._models_py3 import ThroughputSettingsGetResults + from ._models_py3 import ThroughputSettingsResource + from ._models_py3 import ThroughputSettingsUpdateParameters from ._models_py3 import UniqueKey from ._models_py3 import UniqueKeyPolicy from ._models_py3 import Usage from ._models_py3 import VirtualNetworkRule except (SyntaxError, ImportError): + from ._models import ARMProxyResource + from ._models import ARMResourceProperties from ._models import Capability - from ._models import CassandraKeyspace from ._models import CassandraKeyspaceCreateUpdateParameters + from ._models import CassandraKeyspaceGetResults from ._models import CassandraKeyspaceResource from ._models import CassandraPartitionKey from ._models import CassandraSchema - from ._models import CassandraTable from ._models import CassandraTableCreateUpdateParameters + from ._models import CassandraTableGetResults from ._models import CassandraTableResource from ._models import ClusterKey from ._models import Column from ._models import ConflictResolutionPolicy from ._models import ConsistencyPolicy from ._models import ContainerPartitionKey - from ._models import DatabaseAccount from ._models import DatabaseAccountConnectionString from ._models import DatabaseAccountCreateUpdateParameters + from ._models import DatabaseAccountGetResults from ._models import DatabaseAccountListConnectionStringsResult from ._models import DatabaseAccountListKeysResult from ._models import DatabaseAccountListReadOnlyKeysResult @@ -113,11 +125,11 @@ from ._models import ExtendedResourceProperties from ._models import FailoverPolicies from ._models import FailoverPolicy - from ._models import GremlinDatabase from ._models import GremlinDatabaseCreateUpdateParameters + from ._models import GremlinDatabaseGetResults from ._models import GremlinDatabaseResource - from ._models import GremlinGraph from ._models import GremlinGraphCreateUpdateParameters + from ._models import GremlinGraphGetResults from ._models import GremlinGraphResource from ._models import IncludedPath from ._models import Indexes @@ -128,11 +140,11 @@ from ._models import MetricDefinition from ._models import MetricName from ._models import MetricValue - from ._models import MongoDBCollection from ._models import MongoDBCollectionCreateUpdateParameters + from ._models import MongoDBCollectionGetResults from ._models import MongoDBCollectionResource - from ._models import MongoDBDatabase from ._models import MongoDBDatabaseCreateUpdateParameters + from ._models import MongoDBDatabaseGetResults from ._models import MongoDBDatabaseResource from ._models import MongoIndex from ._models import MongoIndexKeys @@ -144,39 +156,50 @@ from ._models import PercentileMetric from ._models import PercentileMetricValue from ._models import RegionForOnlineOffline - from ._models import Resource - from ._models import SqlContainer from ._models import SqlContainerCreateUpdateParameters + from ._models import SqlContainerGetResults from ._models import SqlContainerResource - from ._models import SqlDatabase from ._models import SqlDatabaseCreateUpdateParameters + from ._models import SqlDatabaseGetResults from ._models import SqlDatabaseResource - from ._models import Table + from ._models import SqlStoredProcedureCreateUpdateParameters + from ._models import SqlStoredProcedureGetResults + from ._models import SqlStoredProcedureResource + from ._models import SqlTriggerCreateUpdateParameters + from ._models import SqlTriggerGetResults + from ._models import SqlTriggerResource + from ._models import SqlUserDefinedFunctionCreateUpdateParameters + from ._models import SqlUserDefinedFunctionGetResults + from ._models import SqlUserDefinedFunctionResource from ._models import TableCreateUpdateParameters + from ._models import TableGetResults from ._models import TableResource - from ._models import Throughput - from ._models import ThroughputResource - from ._models import ThroughputUpdateParameters + from ._models import ThroughputSettingsGetResults + from ._models import ThroughputSettingsResource + from ._models import ThroughputSettingsUpdateParameters from ._models import UniqueKey from ._models import UniqueKeyPolicy from ._models import Usage from ._models import VirtualNetworkRule -from ._paged_models import CassandraKeyspacePaged -from ._paged_models import CassandraTablePaged -from ._paged_models import DatabaseAccountPaged -from ._paged_models import GremlinDatabasePaged -from ._paged_models import GremlinGraphPaged +from ._paged_models import CassandraKeyspaceGetResultsPaged +from ._paged_models import CassandraTableGetResultsPaged +from ._paged_models import DatabaseAccountGetResultsPaged +from ._paged_models import GremlinDatabaseGetResultsPaged +from ._paged_models import GremlinGraphGetResultsPaged from ._paged_models import MetricDefinitionPaged from ._paged_models import MetricPaged -from ._paged_models import MongoDBCollectionPaged -from ._paged_models import MongoDBDatabasePaged +from ._paged_models import MongoDBCollectionGetResultsPaged +from ._paged_models import MongoDBDatabaseGetResultsPaged from ._paged_models import OperationPaged from ._paged_models import PartitionMetricPaged from ._paged_models import PartitionUsagePaged from ._paged_models import PercentileMetricPaged -from ._paged_models import SqlContainerPaged -from ._paged_models import SqlDatabasePaged -from ._paged_models import TablePaged +from ._paged_models import SqlContainerGetResultsPaged +from ._paged_models import SqlDatabaseGetResultsPaged +from ._paged_models import SqlStoredProcedureGetResultsPaged +from ._paged_models import SqlTriggerGetResultsPaged +from ._paged_models import SqlUserDefinedFunctionGetResultsPaged +from ._paged_models import TableGetResultsPaged from ._paged_models import UsagePaged from ._cosmos_db_enums import ( DatabaseAccountKind, @@ -188,29 +211,33 @@ IndexKind, PartitionKind, ConflictResolutionMode, + TriggerType, + TriggerOperation, KeyKind, UnitType, PrimaryAggregationType, ) __all__ = [ + 'ARMProxyResource', + 'ARMResourceProperties', 'Capability', - 'CassandraKeyspace', 'CassandraKeyspaceCreateUpdateParameters', + 'CassandraKeyspaceGetResults', 'CassandraKeyspaceResource', 'CassandraPartitionKey', 'CassandraSchema', - 'CassandraTable', 'CassandraTableCreateUpdateParameters', + 'CassandraTableGetResults', 'CassandraTableResource', 'ClusterKey', 'Column', 'ConflictResolutionPolicy', 'ConsistencyPolicy', 'ContainerPartitionKey', - 'DatabaseAccount', 'DatabaseAccountConnectionString', 'DatabaseAccountCreateUpdateParameters', + 'DatabaseAccountGetResults', 'DatabaseAccountListConnectionStringsResult', 'DatabaseAccountListKeysResult', 'DatabaseAccountListReadOnlyKeysResult', @@ -221,11 +248,11 @@ 'ExtendedResourceProperties', 'FailoverPolicies', 'FailoverPolicy', - 'GremlinDatabase', 'GremlinDatabaseCreateUpdateParameters', + 'GremlinDatabaseGetResults', 'GremlinDatabaseResource', - 'GremlinGraph', 'GremlinGraphCreateUpdateParameters', + 'GremlinGraphGetResults', 'GremlinGraphResource', 'IncludedPath', 'Indexes', @@ -236,11 +263,11 @@ 'MetricDefinition', 'MetricName', 'MetricValue', - 'MongoDBCollection', 'MongoDBCollectionCreateUpdateParameters', + 'MongoDBCollectionGetResults', 'MongoDBCollectionResource', - 'MongoDBDatabase', 'MongoDBDatabaseCreateUpdateParameters', + 'MongoDBDatabaseGetResults', 'MongoDBDatabaseResource', 'MongoIndex', 'MongoIndexKeys', @@ -252,40 +279,51 @@ 'PercentileMetric', 'PercentileMetricValue', 'RegionForOnlineOffline', - 'Resource', - 'SqlContainer', 'SqlContainerCreateUpdateParameters', + 'SqlContainerGetResults', 'SqlContainerResource', - 'SqlDatabase', 'SqlDatabaseCreateUpdateParameters', + 'SqlDatabaseGetResults', 'SqlDatabaseResource', - 'Table', + 'SqlStoredProcedureCreateUpdateParameters', + 'SqlStoredProcedureGetResults', + 'SqlStoredProcedureResource', + 'SqlTriggerCreateUpdateParameters', + 'SqlTriggerGetResults', + 'SqlTriggerResource', + 'SqlUserDefinedFunctionCreateUpdateParameters', + 'SqlUserDefinedFunctionGetResults', + 'SqlUserDefinedFunctionResource', 'TableCreateUpdateParameters', + 'TableGetResults', 'TableResource', - 'Throughput', - 'ThroughputResource', - 'ThroughputUpdateParameters', + 'ThroughputSettingsGetResults', + 'ThroughputSettingsResource', + 'ThroughputSettingsUpdateParameters', 'UniqueKey', 'UniqueKeyPolicy', 'Usage', 'VirtualNetworkRule', - 'DatabaseAccountPaged', + 'DatabaseAccountGetResultsPaged', 'MetricPaged', 'UsagePaged', 'MetricDefinitionPaged', - 'SqlDatabasePaged', - 'SqlContainerPaged', - 'MongoDBDatabasePaged', - 'MongoDBCollectionPaged', - 'TablePaged', - 'CassandraKeyspacePaged', - 'CassandraTablePaged', - 'GremlinDatabasePaged', - 'GremlinGraphPaged', 'OperationPaged', 'PercentileMetricPaged', 'PartitionMetricPaged', 'PartitionUsagePaged', + 'SqlDatabaseGetResultsPaged', + 'SqlContainerGetResultsPaged', + 'SqlStoredProcedureGetResultsPaged', + 'SqlUserDefinedFunctionGetResultsPaged', + 'SqlTriggerGetResultsPaged', + 'MongoDBDatabaseGetResultsPaged', + 'MongoDBCollectionGetResultsPaged', + 'TableGetResultsPaged', + 'CassandraKeyspaceGetResultsPaged', + 'CassandraTableGetResultsPaged', + 'GremlinDatabaseGetResultsPaged', + 'GremlinGraphGetResultsPaged', 'DatabaseAccountKind', 'DatabaseAccountOfferType', 'DefaultConsistencyLevel', @@ -295,6 +333,8 @@ 'IndexKind', 'PartitionKind', 'ConflictResolutionMode', + 'TriggerType', + 'TriggerOperation', 'KeyKind', 'UnitType', 'PrimaryAggregationType', diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_enums.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_enums.py index ae8c501d4108..0386fbe056dc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_enums.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_enums.py @@ -74,6 +74,21 @@ class ConflictResolutionMode(str, Enum): custom = "Custom" +class TriggerType(str, Enum): + + pre = "Pre" + post = "Post" + + +class TriggerOperation(str, Enum): + + all = "All" + create = "Create" + update = "Update" + delete = "Delete" + replace = "Replace" + + class KeyKind(str, Enum): primary = "primary" @@ -98,6 +113,6 @@ class PrimaryAggregationType(str, Enum): none = "None" average = "Average" total = "Total" - minimimum = "Minimimum" + minimum = "Minimum" maximum = "Maximum" last = "Last" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py index 62d5d9dea87f..86d20f11a3f6 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py @@ -13,33 +13,49 @@ from msrest.exceptions import HttpOperationError -class Capability(Model): - """Cosmos DB capability object. +class ARMProxyResource(Model): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. - :param name: Name of the Cosmos DB capability. For example, "name": - "EnableCassandra". Current values also include "EnableTable" and - "EnableGremlin". - :type name: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs): - super(Capability, self).__init__(**kwargs) - self.name = kwargs.get('name', None) + super(ARMProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None -class Resource(Model): +class ARMResourceProperties(Model): """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -65,7 +81,7 @@ class Resource(Model): } def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) + super(ARMResourceProperties, self).__init__(**kwargs) self.id = None self.name = None self.type = None @@ -73,17 +89,35 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class CassandraKeyspace(Resource): - """An Azure Cosmos DB Cassandra keyspace. +class Capability(Model): + """Cosmos DB capability object. + + :param name: Name of the Cosmos DB capability. For example, "name": + "EnableCassandra". Current values also include "EnableTable" and + "EnableGremlin". + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Capability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Cassandra keyspace. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -92,16 +126,20 @@ class CassandraKeyspace(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param cassandra_keyspace_id: Required. Name of the Cosmos DB Cassandra + :param resource: Required. The standard JSON format of a Cassandra keyspace - :type cassandra_keyspace_id: str + :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'cassandra_keyspace_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -110,45 +148,80 @@ class CassandraKeyspace(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_keyspace_id': {'key': 'properties.id', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(CassandraKeyspace, self).__init__(**kwargs) - self.cassandra_keyspace_id = kwargs.get('cassandra_keyspace_id', None) + super(CassandraKeyspaceCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) -class CassandraKeyspaceCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra keyspace. +class CassandraKeyspaceGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra keyspace. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Cassandra - keyspace - :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_keyspace_get_results_id: Required. Name of the Cosmos DB + Cassandra keyspace + :type cassandra_keyspace_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_keyspace_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_keyspace_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(CassandraKeyspaceCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(CassandraKeyspaceGetResults, self).__init__(**kwargs) + self.cassandra_keyspace_get_results_id = kwargs.get('cassandra_keyspace_get_results_id', None) + self._rid = None + self._ts = None + self._etag = None class CassandraKeyspaceResource(Model): - """Cosmos DB Cassandra keyspace id object. + """Cosmos DB Cassandra keyspace resource object. All required parameters must be populated in order to send to Azure. @@ -210,17 +283,17 @@ def __init__(self, **kwargs): self.cluster_keys = kwargs.get('cluster_keys', None) -class CassandraTable(Resource): - """An Azure Cosmos DB Cassandra table. +class CassandraTableCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Cassandra table. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -229,19 +302,19 @@ class CassandraTable(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param cassandra_table_id: Required. Name of the Cosmos DB Cassandra table - :type cassandra_table_id: str - :param default_ttl: Time to live of the Cosmos DB Cassandra table - :type default_ttl: int - :param schema: Schema of the Cosmos DB Cassandra table - :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + :param resource: Required. The standard JSON format of a Cassandra table + :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'cassandra_table_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -250,48 +323,88 @@ class CassandraTable(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_table_id': {'key': 'properties.id', 'type': 'str'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(CassandraTable, self).__init__(**kwargs) - self.cassandra_table_id = kwargs.get('cassandra_table_id', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.schema = kwargs.get('schema', None) + super(CassandraTableCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) -class CassandraTableCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra table. +class CassandraTableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra table. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Cassandra table - :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_table_get_results_id: Required. Name of the Cosmos DB + Cassandra table + :type cassandra_table_get_results_id: str + :param default_ttl: Time to live of the Cosmos DB Cassandra table + :type default_ttl: int + :param schema: Schema of the Cosmos DB Cassandra table + :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_table_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_table_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(CassandraTableCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(CassandraTableGetResults, self).__init__(**kwargs) + self.cassandra_table_get_results_id = kwargs.get('cassandra_table_get_results_id', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.schema = kwargs.get('schema', None) + self._rid = None + self._ts = None + self._etag = None class CassandraTableResource(Model): - """Cosmos DB Cassandra table id object. + """Cosmos DB Cassandra table resource object. All required parameters must be populated in order to send to Azure. @@ -461,15 +574,45 @@ def __init__(self, **kwargs): self.kind = kwargs.get('kind', "Hash") -class DatabaseAccount(Resource): - """An Azure Cosmos DB database account. +class DatabaseAccountConnectionString(Model): + """Connection string for the Cosmos DB account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The unique resource identifier of the database account. + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabaseAccountConnectionString, self).__init__(**kwargs) + self.connection_string = None + self.description = None + + +class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -482,16 +625,15 @@ class DatabaseAccount(Resource): at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType + :param consistency_policy: The consistency policy for the Cosmos DB + account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: Required. An array that contains the georeplication + locations enabled for the Cosmos DB account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar database_account_offer_type: Required. The offer type for the + database. Default value: "Standard" . + :vartype database_account_offer_type: str :param ip_range_filter: Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP @@ -505,21 +647,8 @@ class DatabaseAccount(Resource): Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the Cosmos DB - database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the - Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled - for the Cosmos DB account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: - list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :type virtual_network_rules: @@ -539,11 +668,8 @@ class DatabaseAccount(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, } _attribute_map = { @@ -553,82 +679,45 @@ class DatabaseAccount(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, } + database_account_offer_type = "Standard" + def __init__(self, **kwargs): - super(DatabaseAccount, self).__init__(**kwargs) + super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) self.kind = kwargs.get('kind', "GlobalDocumentDB") - self.provisioning_state = kwargs.get('provisioning_state', None) - self.document_endpoint = None - self.database_account_offer_type = None + self.consistency_policy = kwargs.get('consistency_policy', None) + self.locations = kwargs.get('locations', None) self.ip_range_filter = kwargs.get('ip_range_filter', None) self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) - self.consistency_policy = kwargs.get('consistency_policy', None) self.capabilities = kwargs.get('capabilities', None) - self.write_locations = None - self.read_locations = None - self.failover_policies = None self.virtual_network_rules = kwargs.get('virtual_network_rules', None) self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) self.connector_offer = kwargs.get('connector_offer', None) -class DatabaseAccountConnectionString(Model): - """Connection string for the Cosmos DB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update Cosmos DB database accounts. +class DatabaseAccountGetResults(ARMResourceProperties): + """An Azure Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -641,15 +730,16 @@ class DatabaseAccountCreateUpdateParameters(Resource): at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType :param ip_range_filter: Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP @@ -663,8 +753,21 @@ class DatabaseAccountCreateUpdateParameters(Resource): Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the Cosmos DB + database account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :ivar write_locations: An array that contains the write location for the + Cosmos DB account. + :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar read_locations: An array that contains of the read locations enabled + for the Cosmos DB account. + :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: + list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :type virtual_network_rules: @@ -684,8 +787,11 @@ class DatabaseAccountCreateUpdateParameters(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, } _attribute_map = { @@ -695,30 +801,37 @@ class DatabaseAccountCreateUpdateParameters(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, } - database_account_offer_type = "Standard" - def __init__(self, **kwargs): - super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) + super(DatabaseAccountGetResults, self).__init__(**kwargs) self.kind = kwargs.get('kind', "GlobalDocumentDB") - self.consistency_policy = kwargs.get('consistency_policy', None) - self.locations = kwargs.get('locations', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.document_endpoint = None + self.database_account_offer_type = None self.ip_range_filter = kwargs.get('ip_range_filter', None) self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) + self.consistency_policy = kwargs.get('consistency_policy', None) self.capabilities = kwargs.get('capabilities', None) + self.write_locations = None + self.read_locations = None + self.failover_policies = None self.virtual_network_rules = kwargs.get('virtual_network_rules', None) self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) @@ -906,19 +1019,28 @@ def __init__(self, **kwargs): class ExtendedResourceProperties(Model): - """The system generated resource properties associated with SQL databases and - SQL containers. + """The system generated resource properties associated with SQL databases, SQL + containers, Gremlin databases and Gremlin graphs. + + Variables are only populated by the server, and will be ignored when + sending a request. - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str """ + _validation = { + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + _attribute_map = { '_rid': {'key': '_rid', 'type': 'str'}, '_ts': {'key': '_ts', 'type': 'object'}, @@ -927,9 +1049,9 @@ class ExtendedResourceProperties(Model): def __init__(self, **kwargs): super(ExtendedResourceProperties, self).__init__(**kwargs) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) + self._rid = None + self._ts = None + self._etag = None class FailoverPolicies(Model): @@ -991,17 +1113,17 @@ def __init__(self, **kwargs): self.failover_priority = kwargs.get('failover_priority', None) -class GremlinDatabase(Resource): - """An Azure Cosmos DB Gremlin database. +class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Gremlin database. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1010,24 +1132,19 @@ class GremlinDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param gremlin_database_id: Required. Name of the Cosmos DB Gremlin - database - :type gremlin_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str + :param resource: Required. The standard JSON format of a Gremlin database + :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'gremlin_database_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -1036,50 +1153,80 @@ class GremlinDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_database_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(GremlinDatabase, self).__init__(**kwargs) - self.gremlin_database_id = kwargs.get('gremlin_database_id', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) + super(GremlinDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) -class GremlinDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin database. +class GremlinDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB Gremlin database. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Gremlin database - :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_database_get_results_id: Required. Name of the Cosmos DB + Gremlin database + :type gremlin_database_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_database_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'gremlin_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(GremlinDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(GremlinDatabaseGetResults, self).__init__(**kwargs) + self.gremlin_database_get_results_id = kwargs.get('gremlin_database_get_results_id', None) + self._rid = None + self._ts = None + self._etag = None class GremlinDatabaseResource(Model): - """Cosmos DB Gremlin database id object. + """Cosmos DB Gremlin database resource object. All required parameters must be populated in order to send to Azure. @@ -1100,7 +1247,57 @@ def __init__(self, **kwargs): self.id = kwargs.get('id', None) -class GremlinGraph(Resource): +class GremlinGraphCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Gremlin graph. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a Gremlin graph + :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class GremlinGraphGetResults(ARMResourceProperties): """An Azure Cosmos DB Gremlin graph. Variables are only populated by the server, and will be ignored when @@ -1108,9 +1305,9 @@ class GremlinGraph(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1119,8 +1316,9 @@ class GremlinGraph(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph - :type gremlin_graph_id: str + :param gremlin_graph_get_results_id: Required. Name of the Cosmos DB + Gremlin graph + :type gremlin_graph_get_results_id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy @@ -1137,21 +1335,24 @@ class GremlinGraph(Resource): graph. :type conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'gremlin_graph_id': {'required': True}, + 'gremlin_graph_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { @@ -1160,7 +1361,7 @@ class GremlinGraph(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, + 'gremlin_graph_get_results_id': {'key': 'properties.id', 'type': 'str'}, 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, @@ -1172,44 +1373,16 @@ class GremlinGraph(Resource): } def __init__(self, **kwargs): - super(GremlinGraph, self).__init__(**kwargs) - self.gremlin_graph_id = kwargs.get('gremlin_graph_id', None) + super(GremlinGraphGetResults, self).__init__(**kwargs) + self.gremlin_graph_get_results_id = kwargs.get('gremlin_graph_get_results_id', None) self.indexing_policy = kwargs.get('indexing_policy', None) self.partition_key = kwargs.get('partition_key', None) self.default_ttl = kwargs.get('default_ttl', None) self.unique_key_policy = kwargs.get('unique_key_policy', None) self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) - - -class GremlinGraphCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin graph. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Gremlin graph - :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + self._rid = None + self._ts = None + self._etag = None class GremlinGraphResource(Model): @@ -1480,7 +1653,7 @@ class MetricDefinition(Model): :vartype metric_availabilities: list[~azure.mgmt.cosmosdb.models.MetricAvailability] :ivar primary_aggregation_type: The primary aggregation type of the - metric. Possible values include: 'None', 'Average', 'Total', 'Minimimum', + metric. Possible values include: 'None', 'Average', 'Total', 'Minimum', 'Maximum', 'Last' :vartype primary_aggregation_type: str or ~azure.mgmt.cosmosdb.models.PrimaryAggregationType @@ -1594,17 +1767,17 @@ def __init__(self, **kwargs): self.total = None -class MongoDBCollection(Resource): - """An Azure Cosmos DB MongoDB collection. +class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB MongoDB collection. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1613,21 +1786,20 @@ class MongoDBCollection(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB + :param resource: Required. The standard JSON format of a MongoDB collection - :type mongo_db_collection_id: str - :param shard_key: A key-value pair of shard keys to be applied for the - request. - :type shard_key: dict[str, str] - :param indexes: List of index keys - :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_db_collection_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -1636,45 +1808,85 @@ class MongoDBCollection(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, - 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, - 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(MongoDBCollection, self).__init__(**kwargs) - self.mongo_db_collection_id = kwargs.get('mongo_db_collection_id', None) - self.shard_key = kwargs.get('shard_key', None) - self.indexes = kwargs.get('indexes', None) + super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) -class MongoDBCollectionCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB collection. +class MongoDBCollectionGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB collection. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a MongoDB - collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_collection_get_results_id: Required. Name of the Cosmos DB + MongoDB collection + :type mongo_db_collection_get_results_id: str + :param shard_key: A key-value pair of shard keys to be applied for the + request. + :type shard_key: dict[str, str] + :param indexes: List of index keys + :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_collection_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_collection_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, + 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(MongoDBCollectionGetResults, self).__init__(**kwargs) + self.mongo_db_collection_get_results_id = kwargs.get('mongo_db_collection_get_results_id', None) + self.shard_key = kwargs.get('shard_key', None) + self.indexes = kwargs.get('indexes', None) + self._rid = None + self._ts = None + self._etag = None class MongoDBCollectionResource(Model): @@ -1708,17 +1920,17 @@ def __init__(self, **kwargs): self.indexes = kwargs.get('indexes', None) -class MongoDBDatabase(Resource): - """An Azure Cosmos DB MongoDB database. +class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB MongoDB database. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1727,16 +1939,19 @@ class MongoDBDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB - database - :type mongo_db_database_id: str + :param resource: Required. The standard JSON format of a MongoDB database + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_db_database_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -1745,44 +1960,80 @@ class MongoDBDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(MongoDBDatabase, self).__init__(**kwargs) - self.mongo_db_database_id = kwargs.get('mongo_db_database_id', None) + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) -class MongoDBDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB database. +class MongoDBDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB database. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a MongoDB database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_database_get_results_id: Required. Name of the Cosmos DB + MongoDB database + :type mongo_db_database_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_database_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(MongoDBDatabaseGetResults, self).__init__(**kwargs) + self.mongo_db_database_get_results_id = kwargs.get('mongo_db_database_get_results_id', None) + self._rid = None + self._ts = None + self._etag = None class MongoDBDatabaseResource(Model): - """Cosmos DB MongoDB database id object. + """Cosmos DB MongoDB database resource object. All required parameters must be populated in order to send to Azure. @@ -2212,7 +2463,57 @@ def __init__(self, **kwargs): self.region = kwargs.get('region', None) -class SqlContainer(Resource): +class SqlContainerCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a container + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class SqlContainerGetResults(ARMResourceProperties): """An Azure Cosmos DB container. Variables are only populated by the server, and will be ignored when @@ -2220,9 +2521,9 @@ class SqlContainer(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2231,8 +2532,9 @@ class SqlContainer(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param sql_container_id: Required. Name of the Cosmos DB SQL container - :type sql_container_id: str + :param sql_container_get_results_id: Required. Name of the Cosmos DB SQL + container + :type sql_container_get_results_id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container @@ -2250,21 +2552,24 @@ class SqlContainer(Resource): container. :type conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_container_id': {'required': True}, + 'sql_container_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { @@ -2273,7 +2578,7 @@ class SqlContainer(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, + 'sql_container_get_results_id': {'key': 'properties.id', 'type': 'str'}, 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, @@ -2285,44 +2590,16 @@ class SqlContainer(Resource): } def __init__(self, **kwargs): - super(SqlContainer, self).__init__(**kwargs) - self.sql_container_id = kwargs.get('sql_container_id', None) + super(SqlContainerGetResults, self).__init__(**kwargs) + self.sql_container_get_results_id = kwargs.get('sql_container_get_results_id', None) self.indexing_policy = kwargs.get('indexing_policy', None) self.partition_key = kwargs.get('partition_key', None) self.default_ttl = kwargs.get('default_ttl', None) self.unique_key_policy = kwargs.get('unique_key_policy', None) self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) - - -class SqlContainerCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB container. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + self._rid = None + self._ts = None + self._etag = None class SqlContainerResource(Model): @@ -2374,7 +2651,57 @@ def __init__(self, **kwargs): self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) -class SqlDatabase(Resource): +class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB SQL database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a SQL database + :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(SqlDatabaseCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class SqlDatabaseGetResults(ARMResourceProperties): """An Azure Cosmos DB SQL database. Variables are only populated by the server, and will be ignored when @@ -2382,9 +2709,9 @@ class SqlDatabase(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2393,16 +2720,17 @@ class SqlDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param sql_database_id: Required. Name of the Cosmos DB SQL database - :type sql_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :param sql_database_get_results_id: Required. Name of the Cosmos DB SQL + database + :type sql_database_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str :param _colls: A system generated property that specified the addressable path of the collections resource. :type _colls: str @@ -2415,7 +2743,10 @@ class SqlDatabase(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_database_id': {'required': True}, + 'sql_database_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { @@ -2424,7 +2755,7 @@ class SqlDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_database_id': {'key': 'properties.id', 'type': 'str'}, + 'sql_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, '_rid': {'key': 'properties._rid', 'type': 'str'}, '_ts': {'key': 'properties._ts', 'type': 'object'}, '_etag': {'key': 'properties._etag', 'type': 'str'}, @@ -2433,50 +2764,162 @@ class SqlDatabase(Resource): } def __init__(self, **kwargs): - super(SqlDatabase, self).__init__(**kwargs) - self.sql_database_id = kwargs.get('sql_database_id', None) - self._rid = kwargs.get('_rid', None) - self._ts = kwargs.get('_ts', None) - self._etag = kwargs.get('_etag', None) + super(SqlDatabaseGetResults, self).__init__(**kwargs) + self.sql_database_get_results_id = kwargs.get('sql_database_get_results_id', None) + self._rid = None + self._ts = None + self._etag = None self._colls = kwargs.get('_colls', None) self._users = kwargs.get('_users', None) -class SqlDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB SQL database. +class SqlDatabaseResource(Model): + """Cosmos DB SQL database resource object. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a SQL database - :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource + :param id: Required. Name of the Cosmos DB SQL database + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlDatabaseResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB storedProcedure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a storedProcedure + :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource :param options: Required. A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :type options: dict[str, str] """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource': {'required': True}, 'options': {'required': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(SqlDatabaseCreateUpdateParameters, self).__init__(**kwargs) + super(SqlStoredProcedureCreateUpdateParameters, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) self.options = kwargs.get('options', None) -class SqlDatabaseResource(Model): - """Cosmos DB SQL database id object. +class SqlStoredProcedureGetResults(ARMResourceProperties): + """An Azure Cosmos DB storedProcedure. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB SQL database + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_stored_procedure_get_results_id: Required. Name of the Cosmos + DB SQL storedProcedure + :type sql_stored_procedure_get_results_id: str + :param body: Body of the Stored Procedure + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_stored_procedure_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_stored_procedure_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlStoredProcedureGetResults, self).__init__(**kwargs) + self.sql_stored_procedure_get_results_id = kwargs.get('sql_stored_procedure_get_results_id', None) + self.body = kwargs.get('body', None) + self._rid = None + self._ts = None + self._etag = None + + +class SqlStoredProcedureResource(Model): + """Cosmos DB SQL storedProcedure resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL storedProcedure :type id: str + :param body: Body of the Stored Procedure + :type body: str """ _validation = { @@ -2485,24 +2928,76 @@ class SqlDatabaseResource(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, } def __init__(self, **kwargs): - super(SqlDatabaseResource, self).__init__(**kwargs) + super(SqlStoredProcedureResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) + self.body = kwargs.get('body', None) -class Table(Resource): - """An Azure Cosmos DB Table. +class SqlTriggerCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB trigger. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a trigger + :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(SqlTriggerCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class SqlTriggerGetResults(ARMResourceProperties): + """An Azure Cosmos DB trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2511,15 +3006,36 @@ class Table(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param table_id: Required. Name of the Cosmos DB table - :type table_id: str + :param sql_trigger_get_results_id: Required. Name of the Cosmos DB SQL + trigger + :type sql_trigger_get_results_id: str + :param body: Body of the Trigger + :type body: str + :param trigger_type: Type of the Trigger. Possible values include: 'Pre', + 'Post' + :type trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType + :param trigger_operation: The operation the trigger is associated with. + Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace' + :type trigger_operation: str or + ~azure.mgmt.cosmosdb.models.TriggerOperation + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'table_id': {'required': True}, + 'sql_trigger_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { @@ -2528,19 +3044,225 @@ class Table(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'table_id': {'key': 'properties.id', 'type': 'str'}, + 'sql_trigger_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'trigger_operation': {'key': 'properties.triggerOperation', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlTriggerGetResults, self).__init__(**kwargs) + self.sql_trigger_get_results_id = kwargs.get('sql_trigger_get_results_id', None) + self.body = kwargs.get('body', None) + self.trigger_type = kwargs.get('trigger_type', None) + self.trigger_operation = kwargs.get('trigger_operation', None) + self._rid = None + self._ts = None + self._etag = None + + +class SqlTriggerResource(Model): + """Cosmos DB SQL trigger resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL trigger + :type id: str + :param body: Body of the Trigger + :type body: str + :param trigger_type: Type of the Trigger. Possible values include: 'Pre', + 'Post' + :type trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType + :param trigger_operation: The operation the trigger is associated with. + Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace' + :type trigger_operation: str or + ~azure.mgmt.cosmosdb.models.TriggerOperation + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'trigger_operation': {'key': 'triggerOperation', 'type': 'str'}, } def __init__(self, **kwargs): - super(Table, self).__init__(**kwargs) - self.table_id = kwargs.get('table_id', None) + super(SqlTriggerResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.body = kwargs.get('body', None) + self.trigger_type = kwargs.get('trigger_type', None) + self.trigger_operation = kwargs.get('trigger_operation', None) + +class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB userDefinedFunction. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. -class TableCreateUpdateParameters(Model): + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a + userDefinedFunction + :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(SqlUserDefinedFunctionCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) + + +class SqlUserDefinedFunctionGetResults(ARMResourceProperties): + """An Azure Cosmos DB userDefinedFunction. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_user_defined_function_get_results_id: Required. Name of the + Cosmos DB SQL userDefinedFunction + :type sql_user_defined_function_get_results_id: str + :param body: Body of the User Defined Function + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_user_defined_function_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_user_defined_function_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlUserDefinedFunctionGetResults, self).__init__(**kwargs) + self.sql_user_defined_function_get_results_id = kwargs.get('sql_user_defined_function_get_results_id', None) + self.body = kwargs.get('body', None) + self._rid = None + self._ts = None + self._etag = None + + +class SqlUserDefinedFunctionResource(Model): + """Cosmos DB SQL userDefinedFunction resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL userDefinedFunction + :type id: str + :param body: Body of the User Defined Function + :type body: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SqlUserDefinedFunctionResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.body = kwargs.get('body', None) + + +class TableCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB Table. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] :param resource: Required. The standard JSON format of a Table :type resource: ~azure.mgmt.cosmosdb.models.TableResource :param options: Required. A key-value pair of options to be applied for @@ -2549,11 +3271,19 @@ class TableCreateUpdateParameters(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource': {'required': True}, 'options': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } @@ -2564,8 +3294,69 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class TableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Table. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param table_get_results_id: Required. Name of the Cosmos DB table + :type table_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'table_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'table_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TableGetResults, self).__init__(**kwargs) + self.table_get_results_id = kwargs.get('table_get_results_id', None) + self._rid = None + self._ts = None + self._etag = None + + class TableResource(Model): - """Cosmos DB table id object. + """Cosmos DB table resource object. All required parameters must be populated in order to send to Azure. @@ -2586,7 +3377,7 @@ def __init__(self, **kwargs): self.id = kwargs.get('id', None) -class Throughput(Resource): +class ThroughputSettingsGetResults(ARMResourceProperties): """An Azure Cosmos DB resource throughput. Variables are only populated by the server, and will be ignored when @@ -2594,9 +3385,9 @@ class Throughput(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2607,6 +3398,10 @@ class Throughput(Resource): :type tags: dict[str, str] :param throughput: Required. Value of the Cosmos DB resource throughput :type throughput: int + :ivar minimum_throughput: The minimum throughput of the resource + :vartype minimum_throughput: str + :ivar offer_replace_pending: The throughput replace is pending + :vartype offer_replace_pending: str """ _validation = { @@ -2614,6 +3409,8 @@ class Throughput(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'throughput': {'required': True}, + 'minimum_throughput': {'readonly': True}, + 'offer_replace_pending': {'readonly': True}, } _attribute_map = { @@ -2623,55 +3420,94 @@ class Throughput(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'throughput': {'key': 'properties.throughput', 'type': 'int'}, + 'minimum_throughput': {'key': 'properties.minimumThroughput', 'type': 'str'}, + 'offer_replace_pending': {'key': 'properties.offerReplacePending', 'type': 'str'}, } def __init__(self, **kwargs): - super(Throughput, self).__init__(**kwargs) + super(ThroughputSettingsGetResults, self).__init__(**kwargs) self.throughput = kwargs.get('throughput', None) + self.minimum_throughput = None + self.offer_replace_pending = None -class ThroughputResource(Model): +class ThroughputSettingsResource(Model): """Cosmos DB resource throughput object. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. :param throughput: Required. Value of the Cosmos DB resource throughput :type throughput: int + :ivar minimum_throughput: The minimum throughput of the resource + :vartype minimum_throughput: str + :ivar offer_replace_pending: The throughput replace is pending + :vartype offer_replace_pending: str """ _validation = { 'throughput': {'required': True}, + 'minimum_throughput': {'readonly': True}, + 'offer_replace_pending': {'readonly': True}, } _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, + 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, + 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, } def __init__(self, **kwargs): - super(ThroughputResource, self).__init__(**kwargs) + super(ThroughputSettingsResource, self).__init__(**kwargs) self.throughput = kwargs.get('throughput', None) + self.minimum_throughput = None + self.offer_replace_pending = None -class ThroughputUpdateParameters(Model): +class ThroughputSettingsUpdateParameters(ARMResourceProperties): """Parameters to update Cosmos DB resource throughput. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] :param resource: Required. The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource + :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource': {'required': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'ThroughputResource'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsResource'}, } def __init__(self, **kwargs): - super(ThroughputUpdateParameters, self).__init__(**kwargs) + super(ThroughputSettingsUpdateParameters, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py index a42d3f576f56..6e7275a122a5 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py @@ -13,33 +13,49 @@ from msrest.exceptions import HttpOperationError -class Capability(Model): - """Cosmos DB capability object. +class ARMProxyResource(Model): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. - :param name: Name of the Cosmos DB capability. For example, "name": - "EnableCassandra". Current values also include "EnableTable" and - "EnableGremlin". - :type name: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str=None, **kwargs) -> None: - super(Capability, self).__init__(**kwargs) - self.name = name + def __init__(self, **kwargs) -> None: + super(ARMProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None -class Resource(Model): +class ARMResourceProperties(Model): """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -65,7 +81,7 @@ class Resource(Model): } def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) + super(ARMResourceProperties, self).__init__(**kwargs) self.id = None self.name = None self.type = None @@ -73,17 +89,35 @@ def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: self.tags = tags -class CassandraKeyspace(Resource): - """An Azure Cosmos DB Cassandra keyspace. +class Capability(Model): + """Cosmos DB capability object. + + :param name: Name of the Cosmos DB capability. For example, "name": + "EnableCassandra". Current values also include "EnableTable" and + "EnableGremlin". + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(Capability, self).__init__(**kwargs) + self.name = name + + +class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Cassandra keyspace. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -92,16 +126,20 @@ class CassandraKeyspace(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param cassandra_keyspace_id: Required. Name of the Cosmos DB Cassandra + :param resource: Required. The standard JSON format of a Cassandra keyspace - :type cassandra_keyspace_id: str + :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'cassandra_keyspace_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -110,45 +148,80 @@ class CassandraKeyspace(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_keyspace_id': {'key': 'properties.id', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } - def __init__(self, *, cassandra_keyspace_id: str, location: str=None, tags=None, **kwargs) -> None: - super(CassandraKeyspace, self).__init__(location=location, tags=tags, **kwargs) - self.cassandra_keyspace_id = cassandra_keyspace_id + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(CassandraKeyspaceCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options + +class CassandraKeyspaceGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra keyspace. -class CassandraKeyspaceCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra keyspace. + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Cassandra - keyspace - :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_keyspace_get_results_id: Required. Name of the Cosmos DB + Cassandra keyspace + :type cassandra_keyspace_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_keyspace_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_keyspace_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, resource, options, **kwargs) -> None: - super(CassandraKeyspaceCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options + def __init__(self, *, cassandra_keyspace_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.cassandra_keyspace_get_results_id = cassandra_keyspace_get_results_id + self._rid = None + self._ts = None + self._etag = None class CassandraKeyspaceResource(Model): - """Cosmos DB Cassandra keyspace id object. + """Cosmos DB Cassandra keyspace resource object. All required parameters must be populated in order to send to Azure. @@ -210,17 +283,17 @@ def __init__(self, *, columns=None, partition_keys=None, cluster_keys=None, **kw self.cluster_keys = cluster_keys -class CassandraTable(Resource): - """An Azure Cosmos DB Cassandra table. +class CassandraTableCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Cassandra table. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -229,19 +302,19 @@ class CassandraTable(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param cassandra_table_id: Required. Name of the Cosmos DB Cassandra table - :type cassandra_table_id: str - :param default_ttl: Time to live of the Cosmos DB Cassandra table - :type default_ttl: int - :param schema: Schema of the Cosmos DB Cassandra table - :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + :param resource: Required. The standard JSON format of a Cassandra table + :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'cassandra_table_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -250,48 +323,88 @@ class CassandraTable(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'cassandra_table_id': {'key': 'properties.id', 'type': 'str'}, - 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, - 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } - def __init__(self, *, cassandra_table_id: str, location: str=None, tags=None, default_ttl: int=None, schema=None, **kwargs) -> None: - super(CassandraTable, self).__init__(location=location, tags=tags, **kwargs) - self.cassandra_table_id = cassandra_table_id - self.default_ttl = default_ttl - self.schema = schema + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(CassandraTableCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options -class CassandraTableCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Cassandra table. +class CassandraTableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra table. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Cassandra table - :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param cassandra_table_get_results_id: Required. Name of the Cosmos DB + Cassandra table + :type cassandra_table_get_results_id: str + :param default_ttl: Time to live of the Cosmos DB Cassandra table + :type default_ttl: int + :param schema: Schema of the Cosmos DB Cassandra table + :type schema: ~azure.mgmt.cosmosdb.models.CassandraSchema + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'cassandra_table_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'cassandra_table_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'schema': {'key': 'properties.schema', 'type': 'CassandraSchema'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, resource, options, **kwargs) -> None: - super(CassandraTableCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options + def __init__(self, *, cassandra_table_get_results_id: str, location: str=None, tags=None, default_ttl: int=None, schema=None, **kwargs) -> None: + super(CassandraTableGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.cassandra_table_get_results_id = cassandra_table_get_results_id + self.default_ttl = default_ttl + self.schema = schema + self._rid = None + self._ts = None + self._etag = None class CassandraTableResource(Model): - """Cosmos DB Cassandra table id object. + """Cosmos DB Cassandra table resource object. All required parameters must be populated in order to send to Azure. @@ -461,15 +574,45 @@ def __init__(self, *, paths=None, kind="Hash", **kwargs) -> None: self.kind = kind -class DatabaseAccount(Resource): - """An Azure Cosmos DB database account. +class DatabaseAccountConnectionString(Model): + """Connection string for the Cosmos DB account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The unique resource identifier of the database account. + :ivar connection_string: Value of the connection string + :vartype connection_string: str + :ivar description: Description of the connection string + :vartype description: str + """ + + _validation = { + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(DatabaseAccountConnectionString, self).__init__(**kwargs) + self.connection_string = None + self.description = None + + +class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB database accounts. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -482,16 +625,15 @@ class DatabaseAccount(Resource): at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param provisioning_state: - :type provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB - database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB - database account. Default value: Standard. Possible values include: - 'Standard' - :vartype database_account_offer_type: str or - ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType + :param consistency_policy: The consistency policy for the Cosmos DB + account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: Required. An array that contains the georeplication + locations enabled for the Cosmos DB account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar database_account_offer_type: Required. The offer type for the + database. Default value: "Standard" . + :vartype database_account_offer_type: str :param ip_range_filter: Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP @@ -505,21 +647,8 @@ class DatabaseAccount(Resource): Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the Cosmos DB - database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the - Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled - for the Cosmos DB account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by - their failover priorities. - :vartype failover_policies: - list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :type virtual_network_rules: @@ -539,11 +668,8 @@ class DatabaseAccount(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, } _attribute_map = { @@ -553,82 +679,45 @@ class DatabaseAccount(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None: - super(DatabaseAccount, self).__init__(location=location, tags=tags, **kwargs) + database_account_offer_type = "Standard" + + def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None: + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind - self.provisioning_state = provisioning_state - self.document_endpoint = None - self.database_account_offer_type = None + self.consistency_policy = consistency_policy + self.locations = locations self.ip_range_filter = ip_range_filter self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy self.capabilities = capabilities - self.write_locations = None - self.read_locations = None - self.failover_policies = None self.virtual_network_rules = virtual_network_rules self.enable_multiple_write_locations = enable_multiple_write_locations self.enable_cassandra_connector = enable_cassandra_connector self.connector_offer = connector_offer -class DatabaseAccountConnectionString(Model): - """Connection string for the Cosmos DB account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar connection_string: Value of the connection string - :vartype connection_string: str - :ivar description: Description of the connection string - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None - - -class DatabaseAccountCreateUpdateParameters(Resource): - """Parameters to create and update Cosmos DB database accounts. +class DatabaseAccountGetResults(ARMResourceProperties): + """An Azure Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -641,15 +730,16 @@ class DatabaseAccountCreateUpdateParameters(Resource): at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str + :param provisioning_state: + :type provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB + database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB + database account. Default value: Standard. Possible values include: + 'Standard' + :vartype database_account_offer_type: str or + ~azure.mgmt.cosmosdb.models.DatabaseAccountOfferType :param ip_range_filter: Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP @@ -663,8 +753,21 @@ class DatabaseAccountCreateUpdateParameters(Resource): Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the Cosmos DB + database account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :ivar write_locations: An array that contains the write location for the + Cosmos DB account. + :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar read_locations: An array that contains of the read locations enabled + for the Cosmos DB account. + :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar failover_policies: An array that contains the regions ordered by + their failover priorities. + :vartype failover_policies: + list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :type virtual_network_rules: @@ -684,8 +787,11 @@ class DatabaseAccountCreateUpdateParameters(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, } _attribute_map = { @@ -695,30 +801,37 @@ class DatabaseAccountCreateUpdateParameters(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, 'ip_range_filter': {'key': 'properties.ipRangeFilter', 'type': 'str'}, 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, } - database_account_offer_type = "Standard" - - def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None: - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None: + super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations + self.provisioning_state = provisioning_state + self.document_endpoint = None + self.database_account_offer_type = None self.ip_range_filter = ip_range_filter self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy self.capabilities = capabilities + self.write_locations = None + self.read_locations = None + self.failover_policies = None self.virtual_network_rules = virtual_network_rules self.enable_multiple_write_locations = enable_multiple_write_locations self.enable_cassandra_connector = enable_cassandra_connector @@ -906,30 +1019,39 @@ def __init__(self, *, path: str=None, **kwargs) -> None: class ExtendedResourceProperties(Model): - """The system generated resource properties associated with SQL databases and - SQL containers. + """The system generated resource properties associated with SQL databases, SQL + containers, Gremlin databases and Gremlin graphs. + + Variables are only populated by the server, and will be ignored when + sending a request. - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str """ + _validation = { + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + _attribute_map = { '_rid': {'key': '_rid', 'type': 'str'}, '_ts': {'key': '_ts', 'type': 'object'}, '_etag': {'key': '_etag', 'type': 'str'}, } - def __init__(self, *, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(ExtendedResourceProperties, self).__init__(**kwargs) - self._rid = _rid - self._ts = _ts - self._etag = _etag + self._rid = None + self._ts = None + self._etag = None class FailoverPolicies(Model): @@ -991,17 +1113,17 @@ def __init__(self, *, location_name: str=None, failover_priority: int=None, **kw self.failover_priority = failover_priority -class GremlinDatabase(Resource): - """An Azure Cosmos DB Gremlin database. +class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Gremlin database. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1010,24 +1132,19 @@ class GremlinDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param gremlin_database_id: Required. Name of the Cosmos DB Gremlin - database - :type gremlin_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated - timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :type _etag: str + :param resource: Required. The standard JSON format of a Gremlin database + :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'gremlin_database_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -1036,50 +1153,80 @@ class GremlinDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_database_id': {'key': 'properties.id', 'type': 'str'}, - '_rid': {'key': 'properties._rid', 'type': 'str'}, - '_ts': {'key': 'properties._ts', 'type': 'object'}, - '_etag': {'key': 'properties._etag', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } - def __init__(self, *, gremlin_database_id: str, location: str=None, tags=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(GremlinDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.gremlin_database_id = gremlin_database_id - self._rid = _rid - self._ts = _ts - self._etag = _etag + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(GremlinDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options -class GremlinDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin database. +class GremlinDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB Gremlin database. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Gremlin database - :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_database_get_results_id: Required. Name of the Cosmos DB + Gremlin database + :type gremlin_database_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_database_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'gremlin_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, resource, options, **kwargs) -> None: - super(GremlinDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options + def __init__(self, *, gremlin_database_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.gremlin_database_get_results_id = gremlin_database_get_results_id + self._rid = None + self._ts = None + self._etag = None class GremlinDatabaseResource(Model): - """Cosmos DB Gremlin database id object. + """Cosmos DB Gremlin database resource object. All required parameters must be populated in order to send to Azure. @@ -1100,7 +1247,57 @@ def __init__(self, *, id: str, **kwargs) -> None: self.id = id -class GremlinGraph(Resource): +class GremlinGraphCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Gremlin graph. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a Gremlin graph + :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(GremlinGraphCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options + + +class GremlinGraphGetResults(ARMResourceProperties): """An Azure Cosmos DB Gremlin graph. Variables are only populated by the server, and will be ignored when @@ -1108,9 +1305,9 @@ class GremlinGraph(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1119,8 +1316,9 @@ class GremlinGraph(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph - :type gremlin_graph_id: str + :param gremlin_graph_get_results_id: Required. Name of the Cosmos DB + Gremlin graph + :type gremlin_graph_get_results_id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy @@ -1137,21 +1335,24 @@ class GremlinGraph(Resource): graph. :type conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'gremlin_graph_id': {'required': True}, + 'gremlin_graph_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { @@ -1160,7 +1361,7 @@ class GremlinGraph(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, + 'gremlin_graph_get_results_id': {'key': 'properties.id', 'type': 'str'}, 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, @@ -1171,45 +1372,17 @@ class GremlinGraph(Resource): '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, gremlin_graph_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(GremlinGraph, self).__init__(location=location, tags=tags, **kwargs) - self.gremlin_graph_id = gremlin_graph_id + def __init__(self, *, gremlin_graph_get_results_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: + super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.gremlin_graph_get_results_id = gremlin_graph_get_results_id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy - self._rid = _rid - self._ts = _ts - self._etag = _etag - - -class GremlinGraphCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Gremlin graph. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a Gremlin graph - :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options + self._rid = None + self._ts = None + self._etag = None class GremlinGraphResource(Model): @@ -1480,7 +1653,7 @@ class MetricDefinition(Model): :vartype metric_availabilities: list[~azure.mgmt.cosmosdb.models.MetricAvailability] :ivar primary_aggregation_type: The primary aggregation type of the - metric. Possible values include: 'None', 'Average', 'Total', 'Minimimum', + metric. Possible values include: 'None', 'Average', 'Total', 'Minimum', 'Maximum', 'Last' :vartype primary_aggregation_type: str or ~azure.mgmt.cosmosdb.models.PrimaryAggregationType @@ -1594,17 +1767,17 @@ def __init__(self, **kwargs) -> None: self.total = None -class MongoDBCollection(Resource): - """An Azure Cosmos DB MongoDB collection. +class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB MongoDB collection. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1613,21 +1786,20 @@ class MongoDBCollection(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB + :param resource: Required. The standard JSON format of a MongoDB collection - :type mongo_db_collection_id: str - :param shard_key: A key-value pair of shard keys to be applied for the - request. - :type shard_key: dict[str, str] - :param indexes: List of index keys - :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_db_collection_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -1636,45 +1808,85 @@ class MongoDBCollection(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, - 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, - 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } - def __init__(self, *, mongo_db_collection_id: str, location: str=None, tags=None, shard_key=None, indexes=None, **kwargs) -> None: - super(MongoDBCollection, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_db_collection_id = mongo_db_collection_id - self.shard_key = shard_key - self.indexes = indexes + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(MongoDBCollectionCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options -class MongoDBCollectionCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB collection. +class MongoDBCollectionGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB collection. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a MongoDB - collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_collection_get_results_id: Required. Name of the Cosmos DB + MongoDB collection + :type mongo_db_collection_get_results_id: str + :param shard_key: A key-value pair of shard keys to be applied for the + request. + :type shard_key: dict[str, str] + :param indexes: List of index keys + :type indexes: list[~azure.mgmt.cosmosdb.models.MongoIndex] + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_collection_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_collection_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, + 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, resource, options, **kwargs) -> None: - super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options + def __init__(self, *, mongo_db_collection_get_results_id: str, location: str=None, tags=None, shard_key=None, indexes=None, **kwargs) -> None: + super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.mongo_db_collection_get_results_id = mongo_db_collection_get_results_id + self.shard_key = shard_key + self.indexes = indexes + self._rid = None + self._ts = None + self._etag = None class MongoDBCollectionResource(Model): @@ -1708,17 +1920,17 @@ def __init__(self, *, id: str, shard_key=None, indexes=None, **kwargs) -> None: self.indexes = indexes -class MongoDBDatabase(Resource): - """An Azure Cosmos DB MongoDB database. +class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB MongoDB database. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -1727,16 +1939,19 @@ class MongoDBDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB - database - :type mongo_db_database_id: str + :param resource: Required. The standard JSON format of a MongoDB database + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_db_database_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -1745,44 +1960,80 @@ class MongoDBDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } - def __init__(self, *, mongo_db_database_id: str, location: str=None, tags=None, **kwargs) -> None: - super(MongoDBDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_db_database_id = mongo_db_database_id + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options + +class MongoDBDatabaseGetResults(ARMResourceProperties): + """An Azure Cosmos DB MongoDB database. -class MongoDBDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB MongoDB database. + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a MongoDB database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param mongo_db_database_get_results_id: Required. Name of the Cosmos DB + MongoDB database + :type mongo_db_database_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'mongo_db_database_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'mongo_db_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, resource, options, **kwargs) -> None: - super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options + def __init__(self, *, mongo_db_database_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.mongo_db_database_get_results_id = mongo_db_database_get_results_id + self._rid = None + self._ts = None + self._etag = None class MongoDBDatabaseResource(Model): - """Cosmos DB MongoDB database id object. + """Cosmos DB MongoDB database resource object. All required parameters must be populated in order to send to Azure. @@ -2212,7 +2463,57 @@ def __init__(self, *, region: str, **kwargs) -> None: self.region = region -class SqlContainer(Resource): +class SqlContainerCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a container + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(SqlContainerCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options + + +class SqlContainerGetResults(ARMResourceProperties): """An Azure Cosmos DB container. Variables are only populated by the server, and will be ignored when @@ -2220,9 +2521,9 @@ class SqlContainer(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2231,8 +2532,9 @@ class SqlContainer(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param sql_container_id: Required. Name of the Cosmos DB SQL container - :type sql_container_id: str + :param sql_container_get_results_id: Required. Name of the Cosmos DB SQL + container + :type sql_container_get_results_id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container @@ -2250,21 +2552,24 @@ class SqlContainer(Resource): container. :type conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_container_id': {'required': True}, + 'sql_container_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { @@ -2273,7 +2578,7 @@ class SqlContainer(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, + 'sql_container_get_results_id': {'key': 'properties.id', 'type': 'str'}, 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, @@ -2284,45 +2589,17 @@ class SqlContainer(Resource): '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, sql_container_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(SqlContainer, self).__init__(location=location, tags=tags, **kwargs) - self.sql_container_id = sql_container_id + def __init__(self, *, sql_container_get_results_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: + super(SqlContainerGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.sql_container_get_results_id = sql_container_get_results_id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy - self._rid = _rid - self._ts = _ts - self._etag = _etag - - -class SqlContainerCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB container. - - All required parameters must be populated in order to send to Azure. - - :param resource: Required. The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] - """ - - _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, - } - - def __init__(self, *, resource, options, **kwargs) -> None: - super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource - self.options = options + self._rid = None + self._ts = None + self._etag = None class SqlContainerResource(Model): @@ -2374,7 +2651,57 @@ def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default self.conflict_resolution_policy = conflict_resolution_policy -class SqlDatabase(Resource): +class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB SQL database. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a SQL database + :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(SqlDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options + + +class SqlDatabaseGetResults(ARMResourceProperties): """An Azure Cosmos DB SQL database. Variables are only populated by the server, and will be ignored when @@ -2382,9 +2709,9 @@ class SqlDatabase(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2393,16 +2720,17 @@ class SqlDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param sql_database_id: Required. Name of the Cosmos DB SQL database - :type sql_database_id: str - :param _rid: A system generated property. A unique identifier. - :type _rid: str - :param _ts: A system generated property that denotes the last updated + :param sql_database_get_results_id: Required. Name of the Cosmos DB SQL + database + :type sql_database_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated timestamp of the resource. - :type _ts: object - :param _etag: A system generated property representing the resource etag + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag required for optimistic concurrency control. - :type _etag: str + :vartype _etag: str :param _colls: A system generated property that specified the addressable path of the collections resource. :type _colls: str @@ -2415,7 +2743,10 @@ class SqlDatabase(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'sql_database_id': {'required': True}, + 'sql_database_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, } _attribute_map = { @@ -2424,7 +2755,7 @@ class SqlDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sql_database_id': {'key': 'properties.id', 'type': 'str'}, + 'sql_database_get_results_id': {'key': 'properties.id', 'type': 'str'}, '_rid': {'key': 'properties._rid', 'type': 'str'}, '_ts': {'key': 'properties._ts', 'type': 'object'}, '_etag': {'key': 'properties._etag', 'type': 'str'}, @@ -2432,51 +2763,163 @@ class SqlDatabase(Resource): '_users': {'key': 'properties._users', 'type': 'str'}, } - def __init__(self, *, sql_database_id: str, location: str=None, tags=None, _rid: str=None, _ts=None, _etag: str=None, _colls: str=None, _users: str=None, **kwargs) -> None: - super(SqlDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.sql_database_id = sql_database_id - self._rid = _rid - self._ts = _ts - self._etag = _etag + def __init__(self, *, sql_database_get_results_id: str, location: str=None, tags=None, _colls: str=None, _users: str=None, **kwargs) -> None: + super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.sql_database_get_results_id = sql_database_get_results_id + self._rid = None + self._ts = None + self._etag = None self._colls = _colls self._users = _users -class SqlDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB SQL database. +class SqlDatabaseResource(Model): + """Cosmos DB SQL database resource object. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a SQL database - :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource - :param options: Required. A key-value pair of options to be applied for - the request. This corresponds to the headers sent with the request. - :type options: dict[str, str] + :param id: Required. Name of the Cosmos DB SQL database + :type id: str """ _validation = { - 'resource': {'required': True}, - 'options': {'required': True}, + 'id': {'required': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, - 'options': {'key': 'properties.options', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, resource, options, **kwargs) -> None: - super(SqlDatabaseCreateUpdateParameters, self).__init__(**kwargs) - self.resource = resource + def __init__(self, *, id: str, **kwargs) -> None: + super(SqlDatabaseResource, self).__init__(**kwargs) + self.id = id + + +class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB storedProcedure. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a storedProcedure + :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(SqlStoredProcedureCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource self.options = options -class SqlDatabaseResource(Model): - """Cosmos DB SQL database id object. +class SqlStoredProcedureGetResults(ARMResourceProperties): + """An Azure Cosmos DB storedProcedure. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB SQL database + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_stored_procedure_get_results_id: Required. Name of the Cosmos + DB SQL storedProcedure + :type sql_stored_procedure_get_results_id: str + :param body: Body of the Stored Procedure + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_stored_procedure_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_stored_procedure_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, sql_stored_procedure_get_results_id: str, location: str=None, tags=None, body: str=None, **kwargs) -> None: + super(SqlStoredProcedureGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.sql_stored_procedure_get_results_id = sql_stored_procedure_get_results_id + self.body = body + self._rid = None + self._ts = None + self._etag = None + + +class SqlStoredProcedureResource(Model): + """Cosmos DB SQL storedProcedure resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL storedProcedure :type id: str + :param body: Body of the Stored Procedure + :type body: str """ _validation = { @@ -2485,24 +2928,26 @@ class SqlDatabaseResource(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, } - def __init__(self, *, id: str, **kwargs) -> None: - super(SqlDatabaseResource, self).__init__(**kwargs) + def __init__(self, *, id: str, body: str=None, **kwargs) -> None: + super(SqlStoredProcedureResource, self).__init__(**kwargs) self.id = id + self.body = body -class Table(Resource): - """An Azure Cosmos DB Table. +class SqlTriggerCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB trigger. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2511,15 +2956,19 @@ class Table(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param table_id: Required. Name of the Cosmos DB table - :type table_id: str + :param resource: Required. The standard JSON format of a trigger + :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'table_id': {'required': True}, + 'resource': {'required': True}, + 'options': {'required': True}, } _attribute_map = { @@ -2528,19 +2977,292 @@ class Table(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'table_id': {'key': 'properties.id', 'type': 'str'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, } - def __init__(self, *, table_id: str, location: str=None, tags=None, **kwargs) -> None: - super(Table, self).__init__(location=location, tags=tags, **kwargs) - self.table_id = table_id + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(SqlTriggerCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options + + +class SqlTriggerGetResults(ARMResourceProperties): + """An Azure Cosmos DB trigger. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_trigger_get_results_id: Required. Name of the Cosmos DB SQL + trigger + :type sql_trigger_get_results_id: str + :param body: Body of the Trigger + :type body: str + :param trigger_type: Type of the Trigger. Possible values include: 'Pre', + 'Post' + :type trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType + :param trigger_operation: The operation the trigger is associated with. + Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace' + :type trigger_operation: str or + ~azure.mgmt.cosmosdb.models.TriggerOperation + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_trigger_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } -class TableCreateUpdateParameters(Model): + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_trigger_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, + 'trigger_operation': {'key': 'properties.triggerOperation', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, sql_trigger_get_results_id: str, location: str=None, tags=None, body: str=None, trigger_type=None, trigger_operation=None, **kwargs) -> None: + super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.sql_trigger_get_results_id = sql_trigger_get_results_id + self.body = body + self.trigger_type = trigger_type + self.trigger_operation = trigger_operation + self._rid = None + self._ts = None + self._etag = None + + +class SqlTriggerResource(Model): + """Cosmos DB SQL trigger resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL trigger + :type id: str + :param body: Body of the Trigger + :type body: str + :param trigger_type: Type of the Trigger. Possible values include: 'Pre', + 'Post' + :type trigger_type: str or ~azure.mgmt.cosmosdb.models.TriggerType + :param trigger_operation: The operation the trigger is associated with. + Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace' + :type trigger_operation: str or + ~azure.mgmt.cosmosdb.models.TriggerOperation + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + 'trigger_operation': {'key': 'triggerOperation', 'type': 'str'}, + } + + def __init__(self, *, id: str, body: str=None, trigger_type=None, trigger_operation=None, **kwargs) -> None: + super(SqlTriggerResource, self).__init__(**kwargs) + self.id = id + self.body = body + self.trigger_type = trigger_type + self.trigger_operation = trigger_operation + + +class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB userDefinedFunction. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a + userDefinedFunction + :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(SqlUserDefinedFunctionCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options + + +class SqlUserDefinedFunctionGetResults(ARMResourceProperties): + """An Azure Cosmos DB userDefinedFunction. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param sql_user_defined_function_get_results_id: Required. Name of the + Cosmos DB SQL userDefinedFunction + :type sql_user_defined_function_get_results_id: str + :param body: Body of the User Defined Function + :type body: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'sql_user_defined_function_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sql_user_defined_function_get_results_id': {'key': 'properties.id', 'type': 'str'}, + 'body': {'key': 'properties.body', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, sql_user_defined_function_get_results_id: str, location: str=None, tags=None, body: str=None, **kwargs) -> None: + super(SqlUserDefinedFunctionGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.sql_user_defined_function_get_results_id = sql_user_defined_function_get_results_id + self.body = body + self._rid = None + self._ts = None + self._etag = None + + +class SqlUserDefinedFunctionResource(Model): + """Cosmos DB SQL userDefinedFunction resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB SQL userDefinedFunction + :type id: str + :param body: Body of the User Defined Function + :type body: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + } + + def __init__(self, *, id: str, body: str=None, **kwargs) -> None: + super(SqlUserDefinedFunctionResource, self).__init__(**kwargs) + self.id = id + self.body = body + + +class TableCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB Table. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] :param resource: Required. The standard JSON format of a Table :type resource: ~azure.mgmt.cosmosdb.models.TableResource :param options: Required. A key-value pair of options to be applied for @@ -2549,23 +3271,92 @@ class TableCreateUpdateParameters(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource': {'required': True}, 'options': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } - def __init__(self, *, resource, options, **kwargs) -> None: - super(TableCreateUpdateParameters, self).__init__(**kwargs) + def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs) -> None: + super(TableCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options +class TableGetResults(ARMResourceProperties): + """An Azure Cosmos DB Table. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param table_get_results_id: Required. Name of the Cosmos DB table + :type table_get_results_id: str + :ivar _rid: A system generated property. A unique identifier. + :vartype _rid: str + :ivar _ts: A system generated property that denotes the last updated + timestamp of the resource. + :vartype _ts: object + :ivar _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :vartype _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'table_get_results_id': {'required': True}, + '_rid': {'readonly': True}, + '_ts': {'readonly': True}, + '_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'table_get_results_id': {'key': 'properties.id', 'type': 'str'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, table_get_results_id: str, location: str=None, tags=None, **kwargs) -> None: + super(TableGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.table_get_results_id = table_get_results_id + self._rid = None + self._ts = None + self._etag = None + + class TableResource(Model): - """Cosmos DB table id object. + """Cosmos DB table resource object. All required parameters must be populated in order to send to Azure. @@ -2586,7 +3377,7 @@ def __init__(self, *, id: str, **kwargs) -> None: self.id = id -class Throughput(Resource): +class ThroughputSettingsGetResults(ARMResourceProperties): """An Azure Cosmos DB resource throughput. Variables are only populated by the server, and will be ignored when @@ -2594,9 +3385,9 @@ class Throughput(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the database account. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str @@ -2607,6 +3398,10 @@ class Throughput(Resource): :type tags: dict[str, str] :param throughput: Required. Value of the Cosmos DB resource throughput :type throughput: int + :ivar minimum_throughput: The minimum throughput of the resource + :vartype minimum_throughput: str + :ivar offer_replace_pending: The throughput replace is pending + :vartype offer_replace_pending: str """ _validation = { @@ -2614,6 +3409,8 @@ class Throughput(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'throughput': {'required': True}, + 'minimum_throughput': {'readonly': True}, + 'offer_replace_pending': {'readonly': True}, } _attribute_map = { @@ -2623,55 +3420,94 @@ class Throughput(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'throughput': {'key': 'properties.throughput', 'type': 'int'}, + 'minimum_throughput': {'key': 'properties.minimumThroughput', 'type': 'str'}, + 'offer_replace_pending': {'key': 'properties.offerReplacePending', 'type': 'str'}, } def __init__(self, *, throughput: int, location: str=None, tags=None, **kwargs) -> None: - super(Throughput, self).__init__(location=location, tags=tags, **kwargs) + super(ThroughputSettingsGetResults, self).__init__(location=location, tags=tags, **kwargs) self.throughput = throughput + self.minimum_throughput = None + self.offer_replace_pending = None -class ThroughputResource(Model): +class ThroughputSettingsResource(Model): """Cosmos DB resource throughput object. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. :param throughput: Required. Value of the Cosmos DB resource throughput :type throughput: int + :ivar minimum_throughput: The minimum throughput of the resource + :vartype minimum_throughput: str + :ivar offer_replace_pending: The throughput replace is pending + :vartype offer_replace_pending: str """ _validation = { 'throughput': {'required': True}, + 'minimum_throughput': {'readonly': True}, + 'offer_replace_pending': {'readonly': True}, } _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, + 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, + 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, } def __init__(self, *, throughput: int, **kwargs) -> None: - super(ThroughputResource, self).__init__(**kwargs) + super(ThroughputSettingsResource, self).__init__(**kwargs) self.throughput = throughput + self.minimum_throughput = None + self.offer_replace_pending = None -class ThroughputUpdateParameters(Model): +class ThroughputSettingsUpdateParameters(ARMResourceProperties): """Parameters to update Cosmos DB resource throughput. + Variables are only populated by the server, and will be ignored when + sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] :param resource: Required. The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource + :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource': {'required': True}, } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'ThroughputResource'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsResource'}, } - def __init__(self, *, resource, **kwargs) -> None: - super(ThroughputUpdateParameters, self).__init__(**kwargs) + def __init__(self, *, resource, location: str=None, tags=None, **kwargs) -> None: + super(ThroughputSettingsUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py index 4f822e53855b..9c0286b4857b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py @@ -12,19 +12,19 @@ from msrest.paging import Paged -class DatabaseAccountPaged(Paged): +class DatabaseAccountGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`DatabaseAccount ` object + A paging container for iterating over a list of :class:`DatabaseAccountGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseAccount]'} + 'current_page': {'key': 'value', 'type': '[DatabaseAccountGetResults]'} } def __init__(self, *args, **kwargs): - super(DatabaseAccountPaged, self).__init__(*args, **kwargs) + super(DatabaseAccountGetResultsPaged, self).__init__(*args, **kwargs) class MetricPaged(Paged): """ A paging container for iterating over a list of :class:`Metric ` object @@ -64,172 +64,211 @@ class MetricDefinitionPaged(Paged): def __init__(self, *args, **kwargs): super(MetricDefinitionPaged, self).__init__(*args, **kwargs) -class SqlDatabasePaged(Paged): +class OperationPaged(Paged): """ - A paging container for iterating over a list of :class:`SqlDatabase ` object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlDatabase]'} + 'current_page': {'key': 'value', 'type': '[Operation]'} } def __init__(self, *args, **kwargs): - super(SqlDatabasePaged, self).__init__(*args, **kwargs) -class SqlContainerPaged(Paged): + super(OperationPaged, self).__init__(*args, **kwargs) +class PercentileMetricPaged(Paged): """ - A paging container for iterating over a list of :class:`SqlContainer ` object + A paging container for iterating over a list of :class:`PercentileMetric ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlContainer]'} + 'current_page': {'key': 'value', 'type': '[PercentileMetric]'} } def __init__(self, *args, **kwargs): - super(SqlContainerPaged, self).__init__(*args, **kwargs) -class MongoDBDatabasePaged(Paged): + super(PercentileMetricPaged, self).__init__(*args, **kwargs) +class PartitionMetricPaged(Paged): """ - A paging container for iterating over a list of :class:`MongoDBDatabase ` object + A paging container for iterating over a list of :class:`PartitionMetric ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MongoDBDatabase]'} + 'current_page': {'key': 'value', 'type': '[PartitionMetric]'} } def __init__(self, *args, **kwargs): - super(MongoDBDatabasePaged, self).__init__(*args, **kwargs) -class MongoDBCollectionPaged(Paged): + super(PartitionMetricPaged, self).__init__(*args, **kwargs) +class PartitionUsagePaged(Paged): """ - A paging container for iterating over a list of :class:`MongoDBCollection ` object + A paging container for iterating over a list of :class:`PartitionUsage ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MongoDBCollection]'} + 'current_page': {'key': 'value', 'type': '[PartitionUsage]'} } def __init__(self, *args, **kwargs): - super(MongoDBCollectionPaged, self).__init__(*args, **kwargs) -class TablePaged(Paged): + super(PartitionUsagePaged, self).__init__(*args, **kwargs) +class SqlDatabaseGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`Table ` object + A paging container for iterating over a list of :class:`SqlDatabaseGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Table]'} + 'current_page': {'key': 'value', 'type': '[SqlDatabaseGetResults]'} } def __init__(self, *args, **kwargs): - super(TablePaged, self).__init__(*args, **kwargs) -class CassandraKeyspacePaged(Paged): + super(SqlDatabaseGetResultsPaged, self).__init__(*args, **kwargs) +class SqlContainerGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`CassandraKeyspace ` object + A paging container for iterating over a list of :class:`SqlContainerGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CassandraKeyspace]'} + 'current_page': {'key': 'value', 'type': '[SqlContainerGetResults]'} } def __init__(self, *args, **kwargs): - super(CassandraKeyspacePaged, self).__init__(*args, **kwargs) -class CassandraTablePaged(Paged): + super(SqlContainerGetResultsPaged, self).__init__(*args, **kwargs) +class SqlStoredProcedureGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`CassandraTable ` object + A paging container for iterating over a list of :class:`SqlStoredProcedureGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[CassandraTable]'} + 'current_page': {'key': 'value', 'type': '[SqlStoredProcedureGetResults]'} } def __init__(self, *args, **kwargs): - super(CassandraTablePaged, self).__init__(*args, **kwargs) -class GremlinDatabasePaged(Paged): + super(SqlStoredProcedureGetResultsPaged, self).__init__(*args, **kwargs) +class SqlUserDefinedFunctionGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`GremlinDatabase ` object + A paging container for iterating over a list of :class:`SqlUserDefinedFunctionGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GremlinDatabase]'} + 'current_page': {'key': 'value', 'type': '[SqlUserDefinedFunctionGetResults]'} } def __init__(self, *args, **kwargs): - super(GremlinDatabasePaged, self).__init__(*args, **kwargs) -class GremlinGraphPaged(Paged): + super(SqlUserDefinedFunctionGetResultsPaged, self).__init__(*args, **kwargs) +class SqlTriggerGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`GremlinGraph ` object + A paging container for iterating over a list of :class:`SqlTriggerGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GremlinGraph]'} + 'current_page': {'key': 'value', 'type': '[SqlTriggerGetResults]'} } def __init__(self, *args, **kwargs): - super(GremlinGraphPaged, self).__init__(*args, **kwargs) -class OperationPaged(Paged): + super(SqlTriggerGetResultsPaged, self).__init__(*args, **kwargs) +class MongoDBDatabaseGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`Operation ` object + A paging container for iterating over a list of :class:`MongoDBDatabaseGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} + 'current_page': {'key': 'value', 'type': '[MongoDBDatabaseGetResults]'} } def __init__(self, *args, **kwargs): - super(OperationPaged, self).__init__(*args, **kwargs) -class PercentileMetricPaged(Paged): + super(MongoDBDatabaseGetResultsPaged, self).__init__(*args, **kwargs) +class MongoDBCollectionGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`PercentileMetric ` object + A paging container for iterating over a list of :class:`MongoDBCollectionGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PercentileMetric]'} + 'current_page': {'key': 'value', 'type': '[MongoDBCollectionGetResults]'} } def __init__(self, *args, **kwargs): - super(PercentileMetricPaged, self).__init__(*args, **kwargs) -class PartitionMetricPaged(Paged): + super(MongoDBCollectionGetResultsPaged, self).__init__(*args, **kwargs) +class TableGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`PartitionMetric ` object + A paging container for iterating over a list of :class:`TableGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PartitionMetric]'} + 'current_page': {'key': 'value', 'type': '[TableGetResults]'} } def __init__(self, *args, **kwargs): - super(PartitionMetricPaged, self).__init__(*args, **kwargs) -class PartitionUsagePaged(Paged): + super(TableGetResultsPaged, self).__init__(*args, **kwargs) +class CassandraKeyspaceGetResultsPaged(Paged): """ - A paging container for iterating over a list of :class:`PartitionUsage ` object + A paging container for iterating over a list of :class:`CassandraKeyspaceGetResults ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[PartitionUsage]'} + 'current_page': {'key': 'value', 'type': '[CassandraKeyspaceGetResults]'} } def __init__(self, *args, **kwargs): - super(PartitionUsagePaged, self).__init__(*args, **kwargs) + super(CassandraKeyspaceGetResultsPaged, self).__init__(*args, **kwargs) +class CassandraTableGetResultsPaged(Paged): + """ + A paging container for iterating over a list of :class:`CassandraTableGetResults ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CassandraTableGetResults]'} + } + + def __init__(self, *args, **kwargs): + + super(CassandraTableGetResultsPaged, self).__init__(*args, **kwargs) +class GremlinDatabaseGetResultsPaged(Paged): + """ + A paging container for iterating over a list of :class:`GremlinDatabaseGetResults ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GremlinDatabaseGetResults]'} + } + + def __init__(self, *args, **kwargs): + + super(GremlinDatabaseGetResultsPaged, self).__init__(*args, **kwargs) +class GremlinGraphGetResultsPaged(Paged): + """ + A paging container for iterating over a list of :class:`GremlinGraphGetResults ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GremlinGraphGetResults]'} + } + + def __init__(self, *args, **kwargs): + + super(GremlinGraphGetResultsPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py index 5b015813966f..82963bb5681e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py @@ -22,6 +22,11 @@ from ._collection_partition_operations import CollectionPartitionOperations from ._partition_key_range_id_operations import PartitionKeyRangeIdOperations from ._partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations +from ._sql_resources_operations import SqlResourcesOperations +from ._mongo_db_resources_operations import MongoDBResourcesOperations +from ._table_resources_operations import TableResourcesOperations +from ._cassandra_resources_operations import CassandraResourcesOperations +from ._gremlin_resources_operations import GremlinResourcesOperations __all__ = [ 'DatabaseAccountsOperations', @@ -37,4 +42,9 @@ 'CollectionPartitionOperations', 'PartitionKeyRangeIdOperations', 'PartitionKeyRangeIdRegionOperations', + 'SqlResourcesOperations', + 'MongoDBResourcesOperations', + 'TableResourcesOperations', + 'CassandraResourcesOperations', + 'GremlinResourcesOperations', ] diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py new file mode 100644 index 000000000000..1c1b20290d1a --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py @@ -0,0 +1,1063 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class CassandraResourcesOperations(object): + """CassandraResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-08-01. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_cassandra_keyspaces( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the Cassandra keyspaces under an existing Azure Cosmos DB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CassandraKeyspaceGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResultsPaged[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_cassandra_keyspaces.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CassandraKeyspaceGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_cassandra_keyspaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces'} + + def get_cassandra_keyspace( + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the Cassandra keyspaces under an existing Azure Cosmos DB database + account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CassandraKeyspaceGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_cassandra_keyspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CassandraKeyspaceGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}'} + + + def _create_update_cassandra_keyspace_initial( + self, resource_group_name, account_name, keyspace_name, create_update_cassandra_keyspace_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_cassandra_keyspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_cassandra_keyspace_parameters, 'CassandraKeyspaceCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CassandraKeyspaceGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_cassandra_keyspace( + self, resource_group_name, account_name, keyspace_name, create_update_cassandra_keyspace_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB Cassandra keyspace. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param create_update_cassandra_keyspace_parameters: The parameters to + provide for the current Cassandra keyspace. + :type create_update_cassandra_keyspace_parameters: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + CassandraKeyspaceGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_cassandra_keyspace_initial( + resource_group_name=resource_group_name, + account_name=account_name, + keyspace_name=keyspace_name, + create_update_cassandra_keyspace_parameters=create_update_cassandra_keyspace_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('CassandraKeyspaceGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}'} + + + def _delete_cassandra_keyspace_initial( + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_cassandra_keyspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_cassandra_keyspace( + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB Cassandra keyspace. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_cassandra_keyspace_initial( + resource_group_name=resource_group_name, + account_name=account_name, + keyspace_name=keyspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}'} + + def get_cassandra_keyspace_throughput( + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the Cassandra Keyspace under an existing + Azure Cosmos DB database account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_cassandra_keyspace_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cassandra_keyspace_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default'} + + + def _update_cassandra_keyspace_throughput_initial( + self, resource_group_name, account_name, keyspace_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_cassandra_keyspace_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_cassandra_keyspace_throughput( + self, resource_group_name, account_name, keyspace_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param update_throughput_parameters: The RUs per second of the + parameters to provide for the current Cassandra Keyspace. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_cassandra_keyspace_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + keyspace_name=keyspace_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_cassandra_keyspace_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default'} + + def list_cassandra_tables( + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): + """Lists the Cassandra table under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of CassandraTableGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.CassandraTableGetResultsPaged[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_cassandra_tables.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.CassandraTableGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_cassandra_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables'} + + def get_cassandra_table( + self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): + """Gets the Cassandra table under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CassandraTableGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.CassandraTableGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_cassandra_table.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CassandraTableGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}'} + + + def _create_update_cassandra_table_initial( + self, resource_group_name, account_name, keyspace_name, table_name, create_update_cassandra_table_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_cassandra_table.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_cassandra_table_parameters, 'CassandraTableCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CassandraTableGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_cassandra_table( + self, resource_group_name, account_name, keyspace_name, table_name, create_update_cassandra_table_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB Cassandra Table. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: str + :param create_update_cassandra_table_parameters: The parameters to + provide for the current Cassandra Table. + :type create_update_cassandra_table_parameters: + ~azure.mgmt.cosmosdb.models.CassandraTableCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + CassandraTableGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.CassandraTableGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.CassandraTableGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_cassandra_table_initial( + resource_group_name=resource_group_name, + account_name=account_name, + keyspace_name=keyspace_name, + table_name=table_name, + create_update_cassandra_table_parameters=create_update_cassandra_table_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('CassandraTableGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}'} + + + def _delete_cassandra_table_initial( + self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_cassandra_table.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_cassandra_table( + self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB Cassandra table. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_cassandra_table_initial( + resource_group_name=resource_group_name, + account_name=account_name, + keyspace_name=keyspace_name, + table_name=table_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}'} + + def get_cassandra_table_throughput( + self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the Cassandra table under an existing Azure + Cosmos DB database account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_cassandra_table_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_cassandra_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default'} + + + def _update_cassandra_table_throughput_initial( + self, resource_group_name, account_name, keyspace_name, table_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_cassandra_table_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_cassandra_table_throughput( + self, resource_group_name, account_name, keyspace_name, table_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of an Azure Cosmos DB Cassandra table. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: str + :param update_throughput_parameters: The RUs per second of the + parameters to provide for the current Cassandra table. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_cassandra_table_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + keyspace_name=keyspace_name, + table_name=table_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_cassandra_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py index 0ce710ceed2c..6625da8ca5c0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py @@ -25,7 +25,7 @@ class CollectionOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py index 7348d68a0737..9abb55d22edc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py @@ -25,7 +25,7 @@ class CollectionPartitionOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py index f4451ad00060..e5e4e613fbce 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py @@ -25,7 +25,7 @@ class CollectionPartitionRegionOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py index 16d0130581c3..4efa93d1f031 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py @@ -25,7 +25,7 @@ class CollectionRegionOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py index 882503b0bca2..e6936977e156 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py @@ -25,7 +25,7 @@ class DatabaseAccountRegionOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py index 6e831db4ba66..5c69e7f9298b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py @@ -27,7 +27,7 @@ class DatabaseAccountsOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config @@ -55,8 +55,8 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: DatabaseAccount or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccount or + :return: DatabaseAccountGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -94,7 +94,7 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccount', response) + deserialized = self._deserialize('DatabaseAccountGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -147,7 +147,7 @@ def _patch_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccount', response) + deserialized = self._deserialize('DatabaseAccountGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -172,12 +172,13 @@ def patch( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns DatabaseAccount or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns + DatabaseAccountGetResults or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.DatabaseAccount] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.DatabaseAccount]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults]] :raises: :class:`CloudError` """ raw_result = self._patch_initial( @@ -191,7 +192,7 @@ def patch( ) def get_long_running_output(response): - deserialized = self._deserialize('DatabaseAccount', response) + deserialized = self._deserialize('DatabaseAccountGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -250,7 +251,7 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('DatabaseAccount', response) + deserialized = self._deserialize('DatabaseAccountGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -275,12 +276,13 @@ def create_or_update( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns DatabaseAccount or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns + DatabaseAccountGetResults or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.DatabaseAccount] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.DatabaseAccount]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -293,7 +295,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('DatabaseAccount', response) + deserialized = self._deserialize('DatabaseAccountGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -492,9 +494,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of DatabaseAccount + :return: An iterator like instance of DatabaseAccountGetResults :rtype: - ~azure.mgmt.cosmosdb.models.DatabaseAccountPaged[~azure.mgmt.cosmosdb.models.DatabaseAccount] + ~azure.mgmt.cosmosdb.models.DatabaseAccountGetResultsPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -544,7 +546,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.DatabaseAccountGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts'} @@ -561,9 +563,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of DatabaseAccount + :return: An iterator like instance of DatabaseAccountGetResults :rtype: - ~azure.mgmt.cosmosdb.models.DatabaseAccountPaged[~azure.mgmt.cosmosdb.models.DatabaseAccount] + ~azure.mgmt.cosmosdb.models.DatabaseAccountGetResultsPaged[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -614,7 +616,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.DatabaseAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.DatabaseAccountGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts'} @@ -1424,4604 +1426,3 @@ def internal_paging(next_link=None): return deserialized list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions'} - - def list_sql_databases( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the SQL databases under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SqlDatabase - :rtype: - ~azure.mgmt.cosmosdb.models.SqlDatabasePaged[~azure.mgmt.cosmosdb.models.SqlDatabase] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_sql_databases.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_sql_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases'} - - def get_sql_database( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the SQL database under an existing Azure Cosmos DB database - account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SqlDatabase or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.SqlDatabase or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sql_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SqlDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}'} - - - def _create_update_sql_database_initial( - self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_sql_database_parameters = models.SqlDatabaseCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_sql_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_sql_database_parameters, 'SqlDatabaseCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SqlDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_sql_database( - self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB SQL database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param resource: The standard JSON format of a SQL database - :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SqlDatabase or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlDatabase] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlDatabase]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_sql_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}'} - - - def _delete_sql_database_initial( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_sql_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_sql_database( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB SQL database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_sql_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}'} - - def get_sql_database_throughput( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the SQL database under an existing Azure - Cosmos DB database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sql_database_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sql_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/settings/throughput'} - - - def _update_sql_database_throughput_initial( - self, resource_group_name, account_name, database_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_sql_database_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_sql_database_throughput( - self, resource_group_name, account_name, database_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of an Azure Cosmos DB SQL database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_sql_database_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_sql_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/settings/throughput'} - - def list_sql_containers( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists the SQL container under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SqlContainer - :rtype: - ~azure.mgmt.cosmosdb.models.SqlContainerPaged[~azure.mgmt.cosmosdb.models.SqlContainer] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_sql_containers.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_sql_containers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers'} - - def get_sql_container( - self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): - """Gets the SQL container under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SqlContainer or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.SqlContainer or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sql_container.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SqlContainer', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}'} - - - def _create_update_sql_container_initial( - self, resource_group_name, account_name, database_name, container_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_sql_container_parameters = models.SqlContainerCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_sql_container.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_sql_container_parameters, 'SqlContainerCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SqlContainer', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_sql_container( - self, resource_group_name, account_name, database_name, container_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB SQL container. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str - :param resource: The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns SqlContainer or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlContainer] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlContainer]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_sql_container_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlContainer', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}'} - - - def _delete_sql_container_initial( - self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_sql_container.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_sql_container( - self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB SQL container. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_sql_container_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}'} - - def get_sql_container_throughput( - self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the SQL container under an existing Azure - Cosmos DB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sql_container_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sql_container_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}/settings/throughput'} - - - def _update_sql_container_throughput_initial( - self, resource_group_name, account_name, database_name, container_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_sql_container_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_sql_container_throughput( - self, resource_group_name, account_name, database_name, container_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of an Azure Cosmos DB SQL container. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param container_name: Cosmos DB container name. - :type container_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_sql_container_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - container_name=container_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_sql_container_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}/settings/throughput'} - - def list_mongo_db_databases( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the MongoDB databases under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MongoDBDatabase - :rtype: - ~azure.mgmt.cosmosdb.models.MongoDBDatabasePaged[~azure.mgmt.cosmosdb.models.MongoDBDatabase] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_mongo_db_databases.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MongoDBDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_mongo_db_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases'} - - def get_mongo_db_database( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the MongoDB databases under an existing Azure Cosmos DB database - account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MongoDBDatabase or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.MongoDBDatabase or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_mongo_db_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MongoDBDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}'} - - - def _create_update_mongo_db_database_initial( - self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_mongo_db_database_parameters = models.MongoDBDatabaseCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_mongo_db_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_mongo_db_database_parameters, 'MongoDBDatabaseCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MongoDBDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_mongo_db_database( - self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or updates Azure Cosmos DB MongoDB database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param resource: The standard JSON format of a MongoDB database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MongoDBDatabase or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabase] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoDBDatabase]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_mongo_db_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MongoDBDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}'} - - - def _delete_mongo_db_database_initial( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_mongo_db_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_mongo_db_database( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB MongoDB database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_mongo_db_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}'} - - def get_mongo_db_database_throughput( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the MongoDB database under an existing Azure - Cosmos DB database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_mongo_db_database_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_mongo_db_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/settings/throughput'} - - - def _update_mongo_db_database_throughput_initial( - self, resource_group_name, account_name, database_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_mongo_db_database_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_mongo_db_database_throughput( - self, resource_group_name, account_name, database_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of the an Azure Cosmos DB MongoDB database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_mongo_db_database_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_mongo_db_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/settings/throughput'} - - def list_mongo_db_collections( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists the MongoDB collection under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MongoDBCollection - :rtype: - ~azure.mgmt.cosmosdb.models.MongoDBCollectionPaged[~azure.mgmt.cosmosdb.models.MongoDBCollection] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_mongo_db_collections.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.MongoDBCollectionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_mongo_db_collections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections'} - - def get_mongo_db_collection( - self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): - """Gets the MongoDB collection under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MongoDBCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.MongoDBCollection or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_mongo_db_collection.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'collectionName': self._serialize.url("collection_name", collection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MongoDBCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}'} - - - def _create_update_mongo_db_collection_initial( - self, resource_group_name, account_name, database_name, collection_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_mongo_db_collection_parameters = models.MongoDBCollectionCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_mongo_db_collection.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'collectionName': self._serialize.url("collection_name", collection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_mongo_db_collection_parameters, 'MongoDBCollectionCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MongoDBCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_mongo_db_collection( - self, resource_group_name, account_name, database_name, collection_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB MongoDB Collection. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: str - :param resource: The standard JSON format of a MongoDB collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MongoDBCollection or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoDBCollection] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoDBCollection]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_mongo_db_collection_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - collection_name=collection_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MongoDBCollection', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}'} - - - def _delete_mongo_db_collection_initial( - self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_mongo_db_collection.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'collectionName': self._serialize.url("collection_name", collection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_mongo_db_collection( - self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB MongoDB Collection. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_mongo_db_collection_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - collection_name=collection_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}'} - - def get_mongo_db_collection_throughput( - self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the MongoDB collection under an existing - Azure Cosmos DB database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_mongo_db_collection_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'collectionName': self._serialize.url("collection_name", collection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_mongo_db_collection_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}/settings/throughput'} - - - def _update_mongo_db_collection_throughput_initial( - self, resource_group_name, account_name, database_name, collection_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_mongo_db_collection_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'collectionName': self._serialize.url("collection_name", collection_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_mongo_db_collection_throughput( - self, resource_group_name, account_name, database_name, collection_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update the RUs per second of an Azure Cosmos DB MongoDB collection. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param collection_name: Cosmos DB collection name. - :type collection_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_mongo_db_collection_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - collection_name=collection_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_mongo_db_collection_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}/settings/throughput'} - - def list_tables( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the Tables under an existing Azure Cosmos DB database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Table - :rtype: - ~azure.mgmt.cosmosdb.models.TablePaged[~azure.mgmt.cosmosdb.models.Table] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_tables.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.TablePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables'} - - def get_table( - self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): - """Gets the Tables under an existing Azure Cosmos DB database account with - the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Table or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Table or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_table.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Table', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}'} - - - def _create_update_table_initial( - self, resource_group_name, account_name, table_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_table_parameters = models.TableCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_table.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_table_parameters, 'TableCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Table', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_table( - self, resource_group_name, account_name, table_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB Table. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param resource: The standard JSON format of a Table - :type resource: ~azure.mgmt.cosmosdb.models.TableResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Table or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Table] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Table]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_table_initial( - resource_group_name=resource_group_name, - account_name=account_name, - table_name=table_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Table', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}'} - - - def _delete_table_initial( - self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_table.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_table( - self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Table. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param table_name: Cosmos DB table name. - :type table_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_table_initial( - resource_group_name=resource_group_name, - account_name=account_name, - table_name=table_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}'} - - def get_table_throughput( - self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the Table under an existing Azure Cosmos DB - database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_table_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}/settings/throughput'} - - - def _update_table_throughput_initial( - self, resource_group_name, account_name, table_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_table_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_table_throughput( - self, resource_group_name, account_name, table_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of an Azure Cosmos DB Table. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_table_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - table_name=table_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}/settings/throughput'} - - def list_cassandra_keyspaces( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the Cassandra keyspaces under an existing Azure Cosmos DB - database account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CassandraKeyspace - :rtype: - ~azure.mgmt.cosmosdb.models.CassandraKeyspacePaged[~azure.mgmt.cosmosdb.models.CassandraKeyspace] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_cassandra_keyspaces.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CassandraKeyspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_cassandra_keyspaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces'} - - def get_cassandra_keyspace( - self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the Cassandra keyspaces under an existing Azure Cosmos DB database - account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CassandraKeyspace or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.CassandraKeyspace or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_cassandra_keyspace.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CassandraKeyspace', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}'} - - - def _create_update_cassandra_keyspace_initial( - self, resource_group_name, account_name, keyspace_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_cassandra_keyspace_parameters = models.CassandraKeyspaceCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_cassandra_keyspace.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_cassandra_keyspace_parameters, 'CassandraKeyspaceCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CassandraKeyspace', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_cassandra_keyspace( - self, resource_group_name, account_name, keyspace_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB Cassandra keyspace. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param resource: The standard JSON format of a Cassandra keyspace - :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns CassandraKeyspace or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.CassandraKeyspace] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.CassandraKeyspace]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_cassandra_keyspace_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('CassandraKeyspace', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}'} - - - def _delete_cassandra_keyspace_initial( - self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_cassandra_keyspace.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_cassandra_keyspace( - self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Cassandra keyspace. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_cassandra_keyspace_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}'} - - def get_cassandra_keyspace_throughput( - self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the Cassandra Keyspace under an existing - Azure Cosmos DB database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_cassandra_keyspace_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cassandra_keyspace_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/settings/throughput'} - - - def _update_cassandra_keyspace_throughput_initial( - self, resource_group_name, account_name, keyspace_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_cassandra_keyspace_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_cassandra_keyspace_throughput( - self, resource_group_name, account_name, keyspace_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of an Azure Cosmos DB Cassandra Keyspace. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_cassandra_keyspace_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_cassandra_keyspace_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/settings/throughput'} - - def list_cassandra_tables( - self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): - """Lists the Cassandra table under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of CassandraTable - :rtype: - ~azure.mgmt.cosmosdb.models.CassandraTablePaged[~azure.mgmt.cosmosdb.models.CassandraTable] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_cassandra_tables.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.CassandraTablePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_cassandra_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables'} - - def get_cassandra_table( - self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): - """Gets the Cassandra table under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: CassandraTable or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.CassandraTable or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_cassandra_table.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CassandraTable', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}'} - - - def _create_update_cassandra_table_initial( - self, resource_group_name, account_name, keyspace_name, table_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_cassandra_table_parameters = models.CassandraTableCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_cassandra_table.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_cassandra_table_parameters, 'CassandraTableCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('CassandraTable', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_cassandra_table( - self, resource_group_name, account_name, keyspace_name, table_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB Cassandra Table. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param resource: The standard JSON format of a Cassandra table - :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns CassandraTable or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.CassandraTable] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.CassandraTable]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_cassandra_table_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - table_name=table_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('CassandraTable', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}'} - - - def _delete_cassandra_table_initial( - self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_cassandra_table.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_cassandra_table( - self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Cassandra table. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param table_name: Cosmos DB table name. - :type table_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_cassandra_table_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - table_name=table_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}'} - - def get_cassandra_table_throughput( - self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the Cassandra table under an existing Azure - Cosmos DB database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_cassandra_table_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_cassandra_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}/settings/throughput'} - - - def _update_cassandra_table_throughput_initial( - self, resource_group_name, account_name, keyspace_name, table_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_cassandra_table_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'tableName': self._serialize.url("table_name", table_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_cassandra_table_throughput( - self, resource_group_name, account_name, keyspace_name, table_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of an Azure Cosmos DB Cassandra table. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param table_name: Cosmos DB table name. - :type table_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_cassandra_table_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - table_name=table_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_cassandra_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}/settings/throughput'} - - def list_gremlin_databases( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the Gremlin databases under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GremlinDatabase - :rtype: - ~azure.mgmt.cosmosdb.models.GremlinDatabasePaged[~azure.mgmt.cosmosdb.models.GremlinDatabase] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_gremlin_databases.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GremlinDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_gremlin_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases'} - - def get_gremlin_database( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the Gremlin databases under an existing Azure Cosmos DB database - account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GremlinDatabase or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.GremlinDatabase or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_gremlin_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GremlinDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}'} - - - def _create_update_gremlin_database_initial( - self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_gremlin_database_parameters = models.GremlinDatabaseCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_gremlin_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_gremlin_database_parameters, 'GremlinDatabaseCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GremlinDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_gremlin_database( - self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB Gremlin database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param resource: The standard JSON format of a Gremlin database - :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns GremlinDatabase or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.GremlinDatabase] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.GremlinDatabase]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_gremlin_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('GremlinDatabase', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}'} - - - def _delete_gremlin_database_initial( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_gremlin_database.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_gremlin_database( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Gremlin database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_gremlin_database_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}'} - - def get_gremlin_database_throughput( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets the RUs per second of the Gremlin database under an existing Azure - Cosmos DB database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_gremlin_database_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_gremlin_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/settings/throughput'} - - - def _update_gremlin_database_throughput_initial( - self, resource_group_name, account_name, database_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_gremlin_database_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_gremlin_database_throughput( - self, resource_group_name, account_name, database_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of an Azure Cosmos DB Gremlin database. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_gremlin_database_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_gremlin_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/settings/throughput'} - - def list_gremlin_graphs( - self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): - """Lists the Gremlin graph under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of GremlinGraph - :rtype: - ~azure.mgmt.cosmosdb.models.GremlinGraphPaged[~azure.mgmt.cosmosdb.models.GremlinGraph] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_gremlin_graphs.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.GremlinGraphPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_gremlin_graphs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs'} - - def get_gremlin_graph( - self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): - """Gets the Gremlin graph under an existing Azure Cosmos DB database - account. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param graph_name: Cosmos DB graph name. - :type graph_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: GremlinGraph or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.GremlinGraph or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_gremlin_graph.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'graphName': self._serialize.url("graph_name", graph_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GremlinGraph', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}'} - - - def _create_update_gremlin_graph_initial( - self, resource_group_name, account_name, database_name, graph_name, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_gremlin_graph_parameters = models.GremlinGraphCreateUpdateParameters(resource=resource, options=options) - - # Construct URL - url = self.create_update_gremlin_graph.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'graphName': self._serialize.url("graph_name", graph_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_gremlin_graph_parameters, 'GremlinGraphCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('GremlinGraph', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_gremlin_graph( - self, resource_group_name, account_name, database_name, graph_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB Gremlin graph. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param graph_name: Cosmos DB graph name. - :type graph_name: str - :param resource: The standard JSON format of a Gremlin graph - :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource - :param options: A key-value pair of options to be applied for the - request. This corresponds to the headers sent with the request. - :type options: dict[str, 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns GremlinGraph or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.GremlinGraph] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.GremlinGraph]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_gremlin_graph_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - graph_name=graph_name, - resource=resource, - options=options, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('GremlinGraph', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}'} - - - def _delete_gremlin_graph_initial( - self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_gremlin_graph.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'graphName': self._serialize.url("graph_name", graph_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_gremlin_graph( - self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Gremlin graph. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param graph_name: Cosmos DB graph name. - :type graph_name: 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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_gremlin_graph_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - graph_name=graph_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}'} - - def get_gremlin_graph_throughput( - self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): - """Gets the Gremlin graph throughput under an existing Azure Cosmos DB - database account with the provided name. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param graph_name: Cosmos DB graph name. - :type graph_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Throughput or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Throughput or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_gremlin_graph_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'graphName': self._serialize.url("graph_name", graph_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_gremlin_graph_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}/settings/throughput'} - - - def _update_gremlin_graph_throughput_initial( - self, resource_group_name, account_name, database_name, graph_name, resource, custom_headers=None, raw=False, **operation_config): - update_throughput_parameters = models.ThroughputUpdateParameters(resource=resource) - - # Construct URL - url = self.update_gremlin_graph_throughput.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'graphName': self._serialize.url("graph_name", graph_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_gremlin_graph_throughput( - self, resource_group_name, account_name, database_name, graph_name, resource, custom_headers=None, raw=False, polling=True, **operation_config): - """Update RUs per second of an Azure Cosmos DB Gremlin graph. - - :param resource_group_name: Name of an Azure resource group. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param database_name: Cosmos DB database name. - :type database_name: str - :param graph_name: Cosmos DB graph name. - :type graph_name: str - :param resource: The standard JSON format of a resource throughput - :type resource: ~azure.mgmt.cosmosdb.models.ThroughputResource - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Throughput or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Throughput] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Throughput]] - :raises: :class:`CloudError` - """ - raw_result = self._update_gremlin_graph_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - database_name=database_name, - graph_name=graph_name, - resource=resource, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Throughput', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update_gremlin_graph_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}/settings/throughput'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py index 226048cb6f1c..99924fa25e9c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py @@ -25,7 +25,7 @@ class DatabaseOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py new file mode 100644 index 000000000000..a2de0aa16135 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py @@ -0,0 +1,1062 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class GremlinResourcesOperations(object): + """GremlinResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-08-01. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_gremlin_databases( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the Gremlin databases under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GremlinDatabaseGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResultsPaged[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_gremlin_databases.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GremlinDatabaseGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_gremlin_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases'} + + def get_gremlin_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the Gremlin databases under an existing Azure Cosmos DB database + account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GremlinDatabaseGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_gremlin_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GremlinDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}'} + + + def _create_update_gremlin_database_initial( + self, resource_group_name, account_name, database_name, create_update_gremlin_database_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_gremlin_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_gremlin_database_parameters, 'GremlinDatabaseCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GremlinDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_gremlin_database( + self, resource_group_name, account_name, database_name, create_update_gremlin_database_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB Gremlin database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param create_update_gremlin_database_parameters: The parameters to + provide for the current Gremlin database. + :type create_update_gremlin_database_parameters: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + GremlinDatabaseGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_gremlin_database_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + create_update_gremlin_database_parameters=create_update_gremlin_database_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GremlinDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}'} + + + def _delete_gremlin_database_initial( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_gremlin_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_gremlin_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB Gremlin database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_gremlin_database_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}'} + + def get_gremlin_database_throughput( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the Gremlin database under an existing Azure + Cosmos DB database account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_gremlin_database_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_gremlin_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default'} + + + def _update_gremlin_database_throughput_initial( + self, resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_gremlin_database_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_gremlin_database_throughput( + self, resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of an Azure Cosmos DB Gremlin database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the + parameters to provide for the current Gremlin database. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_gremlin_database_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_gremlin_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default'} + + def list_gremlin_graphs( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Lists the Gremlin graph under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GremlinGraphGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.GremlinGraphGetResultsPaged[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_gremlin_graphs.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GremlinGraphGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_gremlin_graphs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs'} + + def get_gremlin_graph( + self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): + """Gets the Gremlin graph under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: GremlinGraphGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.GremlinGraphGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_gremlin_graph.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GremlinGraphGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}'} + + + def _create_update_gremlin_graph_initial( + self, resource_group_name, account_name, database_name, graph_name, create_update_gremlin_graph_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_gremlin_graph.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_gremlin_graph_parameters, 'GremlinGraphCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('GremlinGraphGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_gremlin_graph( + self, resource_group_name, account_name, database_name, graph_name, create_update_gremlin_graph_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: str + :param create_update_gremlin_graph_parameters: The parameters to + provide for the current Gremlin graph. + :type create_update_gremlin_graph_parameters: + ~azure.mgmt.cosmosdb.models.GremlinGraphCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns GremlinGraphGetResults + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_gremlin_graph_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + graph_name=graph_name, + create_update_gremlin_graph_parameters=create_update_gremlin_graph_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('GremlinGraphGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}'} + + + def _delete_gremlin_graph_initial( + self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_gremlin_graph.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_gremlin_graph( + self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB Gremlin graph. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_gremlin_graph_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + graph_name=graph_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}'} + + def get_gremlin_graph_throughput( + self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): + """Gets the Gremlin graph throughput under an existing Azure Cosmos DB + database account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_gremlin_graph_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_gremlin_graph_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default'} + + + def _update_gremlin_graph_throughput_initial( + self, resource_group_name, account_name, database_name, graph_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_gremlin_graph_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_gremlin_graph_throughput( + self, resource_group_name, account_name, database_name, graph_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of an Azure Cosmos DB Gremlin graph. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: str + :param update_throughput_parameters: The RUs per second of the + parameters to provide for the current Gremlin graph. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_gremlin_graph_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + graph_name=graph_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_gremlin_graph_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py new file mode 100644 index 000000000000..b3a5a85ce810 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py @@ -0,0 +1,1063 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class MongoDBResourcesOperations(object): + """MongoDBResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-08-01. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_mongo_db_databases( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the MongoDB databases under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MongoDBDatabaseGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResultsPaged[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_mongo_db_databases.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MongoDBDatabaseGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_mongo_db_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases'} + + def get_mongo_db_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the MongoDB databases under an existing Azure Cosmos DB database + account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MongoDBDatabaseGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_mongo_db_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MongoDBDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}'} + + + def _create_update_mongo_db_database_initial( + self, resource_group_name, account_name, database_name, create_update_mongo_db_database_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_mongo_db_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_mongo_db_database_parameters, 'MongoDBDatabaseCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MongoDBDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_mongo_db_database( + self, resource_group_name, account_name, database_name, create_update_mongo_db_database_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or updates Azure Cosmos DB MongoDB database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param create_update_mongo_db_database_parameters: The parameters to + provide for the current MongoDB database. + :type create_update_mongo_db_database_parameters: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + MongoDBDatabaseGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_mongo_db_database_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + create_update_mongo_db_database_parameters=create_update_mongo_db_database_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MongoDBDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}'} + + + def _delete_mongo_db_database_initial( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_mongo_db_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_mongo_db_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB MongoDB database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_mongo_db_database_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}'} + + def get_mongo_db_database_throughput( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the MongoDB database under an existing Azure + Cosmos DB database account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_mongo_db_database_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_mongo_db_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default'} + + + def _update_mongo_db_database_throughput_initial( + self, resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_mongo_db_database_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_mongo_db_database_throughput( + self, resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of the an Azure Cosmos DB MongoDB database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param update_throughput_parameters: The RUs per second of the + parameters to provide for the current MongoDB database. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_mongo_db_database_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_mongo_db_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default'} + + def list_mongo_db_collections( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Lists the MongoDB collection under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MongoDBCollectionGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResultsPaged[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_mongo_db_collections.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MongoDBCollectionGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_mongo_db_collections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections'} + + def get_mongo_db_collection( + self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): + """Gets the MongoDB collection under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MongoDBCollectionGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_mongo_db_collection.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MongoDBCollectionGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'} + + + def _create_update_mongo_db_collection_initial( + self, resource_group_name, account_name, database_name, collection_name, create_update_mongo_db_collection_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_mongo_db_collection.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_mongo_db_collection_parameters, 'MongoDBCollectionCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MongoDBCollectionGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_mongo_db_collection( + self, resource_group_name, account_name, database_name, collection_name, create_update_mongo_db_collection_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB MongoDB Collection. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param create_update_mongo_db_collection_parameters: The parameters to + provide for the current MongoDB Collection. + :type create_update_mongo_db_collection_parameters: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + MongoDBCollectionGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoDBCollectionGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_mongo_db_collection_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + create_update_mongo_db_collection_parameters=create_update_mongo_db_collection_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MongoDBCollectionGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'} + + + def _delete_mongo_db_collection_initial( + self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_mongo_db_collection.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_mongo_db_collection( + self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB MongoDB Collection. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_mongo_db_collection_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'} + + def get_mongo_db_collection_throughput( + self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the MongoDB collection under an existing + Azure Cosmos DB database account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_mongo_db_collection_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_mongo_db_collection_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default'} + + + def _update_mongo_db_collection_throughput_initial( + self, resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_mongo_db_collection_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_mongo_db_collection_throughput( + self, resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the RUs per second of an Azure Cosmos DB MongoDB collection. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param update_throughput_parameters: The RUs per second of the + parameters to provide for the current MongoDB collection. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_mongo_db_collection_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_mongo_db_collection_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py index fc8994661650..99522b8106ec 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py @@ -25,7 +25,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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py index 657f9b252730..3b40c73a7331 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py @@ -25,7 +25,7 @@ class PartitionKeyRangeIdOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py index e79d4faa16fb..e8845d4361a5 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py @@ -25,7 +25,7 @@ class PartitionKeyRangeIdRegionOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py index f091bfcb9b9e..6060f545eaed 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py @@ -25,7 +25,7 @@ class PercentileOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py index abc142c32f5f..5e4f6f3135fc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py @@ -25,7 +25,7 @@ class PercentileSourceTargetOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py index 5717ef99c4ad..5bb6c3a69845 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py @@ -25,7 +25,7 @@ class PercentileTargetOperations(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. The current version is 2015-04-08. Constant value: "2015-04-08". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-08" + self.api_version = "2019-08-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py new file mode 100644 index 000000000000..55120ab74132 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py @@ -0,0 +1,2129 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SqlResourcesOperations(object): + """SqlResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2019-08-01. Constant value: "2019-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + + self.config = config + + def list_sql_databases( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the SQL databases under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SqlDatabaseGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.SqlDatabaseGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_sql_databases.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SqlDatabaseGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_sql_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases'} + + def get_sql_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the SQL database under an existing Azure Cosmos DB database + account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlDatabaseGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sql_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}'} + + + def _create_update_sql_database_initial( + self, resource_group_name, account_name, database_name, create_update_sql_database_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_sql_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_sql_database_parameters, 'SqlDatabaseCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SqlDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_sql_database( + self, resource_group_name, account_name, database_name, create_update_sql_database_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB SQL database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param create_update_sql_database_parameters: The parameters to + provide for the current SQL database. + :type create_update_sql_database_parameters: + ~azure.mgmt.cosmosdb.models.SqlDatabaseCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SqlDatabaseGetResults + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlDatabaseGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_sql_database_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + create_update_sql_database_parameters=create_update_sql_database_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SqlDatabaseGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}'} + + + def _delete_sql_database_initial( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_sql_database.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_sql_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB SQL database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_sql_database_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}'} + + def get_sql_database_throughput( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the SQL database under an existing Azure + Cosmos DB database account with the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sql_database_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sql_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default'} + + + def _update_sql_database_throughput_initial( + self, resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_sql_database_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_sql_database_throughput( + self, resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of an Azure Cosmos DB SQL database. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param update_throughput_parameters: The parameters to provide for the + RUs per second of the current SQL database. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_sql_database_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_sql_database_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default'} + + def list_sql_containers( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Lists the SQL container under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SqlContainerGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.SqlContainerGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_sql_containers.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SqlContainerGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_sql_containers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers'} + + def get_sql_container( + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): + """Gets the SQL container under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlContainerGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.SqlContainerGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sql_container.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlContainerGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}'} + + + def _create_update_sql_container_initial( + self, resource_group_name, account_name, database_name, container_name, create_update_sql_container_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_sql_container.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_sql_container_parameters, 'SqlContainerCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SqlContainerGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_sql_container( + self, resource_group_name, account_name, database_name, container_name, create_update_sql_container_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB SQL container. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param create_update_sql_container_parameters: The parameters to + provide for the current SQL container. + :type create_update_sql_container_parameters: + ~azure.mgmt.cosmosdb.models.SqlContainerCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SqlContainerGetResults + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlContainerGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlContainerGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_sql_container_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + create_update_sql_container_parameters=create_update_sql_container_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SqlContainerGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}'} + + + def _delete_sql_container_initial( + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_sql_container.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_sql_container( + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB SQL container. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_sql_container_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}'} + + def get_sql_container_throughput( + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the SQL container under an existing Azure + Cosmos DB database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sql_container_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sql_container_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default'} + + + def _update_sql_container_throughput_initial( + self, resource_group_name, account_name, database_name, container_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_sql_container_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_sql_container_throughput( + self, resource_group_name, account_name, database_name, container_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of an Azure Cosmos DB SQL container. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param update_throughput_parameters: The parameters to provide for the + RUs per second of the current SQL container. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_sql_container_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_sql_container_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default'} + + def list_sql_stored_procedures( + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): + """Lists the SQL storedProcedure under an existing Azure Cosmos DB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SqlStoredProcedureGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_sql_stored_procedures.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SqlStoredProcedureGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_sql_stored_procedures.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/'} + + def get_sql_stored_procedure( + self, resource_group_name, account_name, database_name, container_name, stored_procedure_name, custom_headers=None, raw=False, **operation_config): + """Gets the SQL storedProcedure under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param stored_procedure_name: Cosmos DB storedProcedure name. + :type stored_procedure_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlStoredProcedureGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sql_stored_procedure.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'storedProcedureName': self._serialize.url("stored_procedure_name", stored_procedure_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlStoredProcedureGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sql_stored_procedure.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}'} + + + def _create_update_sql_stored_procedure_initial( + self, resource_group_name, account_name, database_name, container_name, stored_procedure_name, create_update_sql_stored_procedure_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_sql_stored_procedure.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'storedProcedureName': self._serialize.url("stored_procedure_name", stored_procedure_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_sql_stored_procedure_parameters, 'SqlStoredProcedureCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SqlStoredProcedureGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_sql_stored_procedure( + self, resource_group_name, account_name, database_name, container_name, stored_procedure_name, create_update_sql_stored_procedure_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB SQL storedProcedure. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param stored_procedure_name: Cosmos DB storedProcedure name. + :type stored_procedure_name: str + :param create_update_sql_stored_procedure_parameters: The parameters + to provide for the current SQL storedProcedure. + :type create_update_sql_stored_procedure_parameters: + ~azure.mgmt.cosmosdb.models.SqlStoredProcedureCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + SqlStoredProcedureGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_sql_stored_procedure_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + stored_procedure_name=stored_procedure_name, + create_update_sql_stored_procedure_parameters=create_update_sql_stored_procedure_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SqlStoredProcedureGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_sql_stored_procedure.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}'} + + + def _delete_sql_stored_procedure_initial( + self, resource_group_name, account_name, database_name, container_name, stored_procedure_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_sql_stored_procedure.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'storedProcedureName': self._serialize.url("stored_procedure_name", stored_procedure_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_sql_stored_procedure( + self, resource_group_name, account_name, database_name, container_name, stored_procedure_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB SQL storedProcedure. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param stored_procedure_name: Cosmos DB storedProcedure name. + :type stored_procedure_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_sql_stored_procedure_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + stored_procedure_name=stored_procedure_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_sql_stored_procedure.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}'} + + def list_sql_user_defined_functions( + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): + """Lists the SQL userDefinedFunction under an existing Azure Cosmos DB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SqlUserDefinedFunctionGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_sql_user_defined_functions.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SqlUserDefinedFunctionGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_sql_user_defined_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/'} + + def get_sql_user_defined_function( + self, resource_group_name, account_name, database_name, container_name, user_defined_function_name, custom_headers=None, raw=False, **operation_config): + """Gets the SQL userDefinedFunction under an existing Azure Cosmos DB + database account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :type user_defined_function_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlUserDefinedFunctionGetResults or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sql_user_defined_function.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'userDefinedFunctionName': self._serialize.url("user_defined_function_name", user_defined_function_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sql_user_defined_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}'} + + + def _create_update_sql_user_defined_function_initial( + self, resource_group_name, account_name, database_name, container_name, user_defined_function_name, create_update_sql_user_defined_function_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_sql_user_defined_function.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'userDefinedFunctionName': self._serialize.url("user_defined_function_name", user_defined_function_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_sql_user_defined_function_parameters, 'SqlUserDefinedFunctionCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_sql_user_defined_function( + self, resource_group_name, account_name, database_name, container_name, user_defined_function_name, create_update_sql_user_defined_function_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB SQL userDefinedFunction. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :type user_defined_function_name: str + :param create_update_sql_user_defined_function_parameters: The + parameters to provide for the current SQL userDefinedFunction. + :type create_update_sql_user_defined_function_parameters: + ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + SqlUserDefinedFunctionGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_sql_user_defined_function_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + user_defined_function_name=user_defined_function_name, + create_update_sql_user_defined_function_parameters=create_update_sql_user_defined_function_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SqlUserDefinedFunctionGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_sql_user_defined_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}'} + + + def _delete_sql_user_defined_function_initial( + self, resource_group_name, account_name, database_name, container_name, user_defined_function_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_sql_user_defined_function.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'userDefinedFunctionName': self._serialize.url("user_defined_function_name", user_defined_function_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_sql_user_defined_function( + self, resource_group_name, account_name, database_name, container_name, user_defined_function_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB SQL userDefinedFunction. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param user_defined_function_name: Cosmos DB userDefinedFunction name. + :type user_defined_function_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_sql_user_defined_function_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + user_defined_function_name=user_defined_function_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_sql_user_defined_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}'} + + def list_sql_triggers( + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): + """Lists the SQL trigger under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SqlTriggerGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.SqlTriggerGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_sql_triggers.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SqlTriggerGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_sql_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/'} + + def get_sql_trigger( + self, resource_group_name, account_name, database_name, container_name, trigger_name, custom_headers=None, raw=False, **operation_config): + """Gets the SQL trigger under an existing Azure Cosmos DB database + account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param trigger_name: Cosmos DB trigger name. + :type trigger_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlTriggerGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.SqlTriggerGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_sql_trigger.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlTriggerGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_sql_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}'} + + + def _create_update_sql_trigger_initial( + self, resource_group_name, account_name, database_name, container_name, trigger_name, create_update_sql_trigger_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_update_sql_trigger.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(create_update_sql_trigger_parameters, 'SqlTriggerCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SqlTriggerGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_update_sql_trigger( + self, resource_group_name, account_name, database_name, container_name, trigger_name, create_update_sql_trigger_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB SQL trigger. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param trigger_name: Cosmos DB trigger name. + :type trigger_name: str + :param create_update_sql_trigger_parameters: The parameters to provide + for the current SQL trigger. + :type create_update_sql_trigger_parameters: + ~azure.mgmt.cosmosdb.models.SqlTriggerCreateUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns SqlTriggerGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlTriggerGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._create_update_sql_trigger_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + trigger_name=trigger_name, + create_update_sql_trigger_parameters=create_update_sql_trigger_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SqlTriggerGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_update_sql_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}'} + + + def _delete_sql_trigger_initial( + self, resource_group_name, account_name, database_name, container_name, trigger_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_sql_trigger.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete_sql_trigger( + self, resource_group_name, account_name, database_name, container_name, trigger_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB SQL trigger. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param trigger_name: Cosmos DB trigger name. + :type trigger_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_sql_trigger_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + trigger_name=trigger_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete_sql_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}'} diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machine_extensions_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py similarity index 54% rename from sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machine_extensions_operations.py rename to sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py index b6d8f89764c8..de9502cf86aa 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machine_extensions_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py @@ -18,8 +18,8 @@ from .. import models -class MachineExtensionsOperations(object): - """MachineExtensionsOperations operations. +class TableResourcesOperations(object): + """TableResourcesOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -27,7 +27,7 @@ class MachineExtensionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2019-08-02-preview". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". """ models = models @@ -37,20 +37,110 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-02-preview" + self.api_version = "2019-08-01" self.config = config + def list_tables( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the Tables under an existing Azure Cosmos DB database account. - def _create_or_update_initial( - self, resource_group_name, name, extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TableGetResults + :rtype: + ~azure.mgmt.cosmosdb.models.TableGetResultsPaged[~azure.mgmt.cosmosdb.models.TableGetResults] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_tables.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TableGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables'} + + def get_table( + self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): + """Gets the Tables under an existing Azure Cosmos DB database account with + the provided name. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param table_name: Cosmos DB table name. + :type table_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: TableGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.TableGetResults or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ # Construct URL - url = self.create_or_update.metadata['url'] + url = self.get_table.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -61,7 +151,6 @@ def _create_or_update_initial( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -69,95 +158,36 @@ def _create_or_update_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(extension_parameters, 'MachineExtension') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MachineExtension', response) + deserialized = self._deserialize('TableGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - - def create_or_update( - self, resource_group_name, name, extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the machine where the extension should be - created or updated. - :type name: str - :param extension_name: The name of the machine extension. - :type extension_name: str - :param extension_parameters: Parameters supplied to the Create Machine - Extension operation. - :type extension_parameters: - ~azure.mgmt.hybridcompute.models.MachineExtension - :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 - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns MachineExtension or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hybridcompute.models.MachineExtension] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hybridcompute.models.MachineExtension]] - :raises: :class:`CloudError` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - name=name, - extension_name=extension_name, - extension_parameters=extension_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('MachineExtension', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'} + get_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}'} - def _update_initial( - self, resource_group_name, name, extension_name, extension_parameters, custom_headers=None, raw=False, **operation_config): + def _create_update_table_initial( + self, resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.update.metadata['url'] + url = self.create_update_table.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -177,10 +207,10 @@ def _update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(extension_parameters, 'MachineExtensionUpdate') + body_content = self._serialize.body(create_update_table_parameters, 'TableCreateUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) + request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: @@ -191,7 +221,7 @@ def _update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MachineExtension', response) + deserialized = self._deserialize('TableGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -199,46 +229,45 @@ def _update_initial( return deserialized - def update( - self, resource_group_name, name, extension_name, extension_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to create or update the extension. + def create_update_table( + self, resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB Table. - :param resource_group_name: The name of the resource group. + :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param name: The name of the machine where the extension should be - created or updated. - :type name: str - :param extension_name: The name of the machine extension. - :type extension_name: str - :param extension_parameters: Parameters supplied to the Create Machine - Extension operation. - :type extension_parameters: - ~azure.mgmt.hybridcompute.models.MachineExtensionUpdate + :param account_name: Cosmos DB database account name. + :type account_name: str + :param table_name: Cosmos DB table name. + :type table_name: str + :param create_update_table_parameters: The parameters to provide for + the current Table. + :type create_update_table_parameters: + ~azure.mgmt.cosmosdb.models.TableCreateUpdateParameters :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 :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns MachineExtension or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns TableGetResults or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hybridcompute.models.MachineExtension] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.TableGetResults] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hybridcompute.models.MachineExtension]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.TableGetResults]] :raises: :class:`CloudError` """ - raw_result = self._update_initial( + raw_result = self._create_update_table_initial( resource_group_name=resource_group_name, - name=name, - extension_name=extension_name, - extension_parameters=extension_parameters, + account_name=account_name, + table_name=table_name, + create_update_table_parameters=create_update_table_parameters, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('MachineExtension', response) + deserialized = self._deserialize('TableGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -253,18 +282,18 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'} + create_update_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}'} - def _delete_initial( - self, resource_group_name, name, extension_name, custom_headers=None, raw=False, **operation_config): + def _delete_table_initial( + self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete.metadata['url'] + url = self.delete_table.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -285,7 +314,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202, 204]: + if response.status_code not in [202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -294,17 +323,16 @@ def _delete_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def delete( - self, resource_group_name, name, extension_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to delete the extension. + def delete_table( + self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB Table. - :param resource_group_name: The name of the resource group. + :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param name: The name of the machine where the extension should be - deleted. - :type name: str - :param extension_name: The name of the machine extension. - :type extension_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param table_name: Cosmos DB table name. + :type table_name: 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 @@ -316,10 +344,10 @@ def delete( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._delete_initial( + raw_result = self._delete_table_initial( resource_group_name=resource_group_name, - name=name, - extension_name=extension_name, + account_name=account_name, + table_name=table_name, custom_headers=custom_headers, raw=True, **operation_config @@ -337,35 +365,36 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'} + delete_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}'} - def get( - self, resource_group_name, name, extension_name, custom_headers=None, raw=False, **operation_config): - """The operation to get the extension. + def get_table_throughput( + self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): + """Gets the RUs per second of the Table under an existing Azure Cosmos DB + database account with the provided name. - :param resource_group_name: The name of the resource group. + :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str - :param name: The name of the machine containing the extension. - :type name: str - :param extension_name: The name of the machine extension. - :type extension_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param table_name: Cosmos DB table name. + :type table_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: MachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridcompute.models.MachineExtension or + :return: ThroughputSettingsGetResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.get_table_throughput.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'extensionName': self._serialize.url("extension_name", extension_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -394,87 +423,118 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MachineExtension', response) + deserialized = self._deserialize('ThroughputSettingsGetResults', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'} + get_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default'} - def list( - self, resource_group_name, name, expand=None, custom_headers=None, raw=False, **operation_config): - """The operation to get all extensions of a non-Azure machine. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the machine containing the extension. - :type name: str - :param expand: The expand expression to apply on the operation. - :type expand: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of MachineExtension - :rtype: - ~azure.mgmt.hybridcompute.models.MachineExtensionPaged[~azure.mgmt.hybridcompute.models.MachineExtension] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + def _update_table_throughput_initial( + self, resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_table_throughput.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'tableName': self._serialize.url("table_name", table_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - query_parameters = {} + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct body + body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') - def internal_paging(next_link=None): - request = prepare_request(next_link) + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - response = self._client.send(request, stream=False, **operation_config) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + deserialized = None - return response + if response.status_code == 200: + deserialized = self._deserialize('ThroughputSettingsGetResults', response) - # Deserialize response - header_dict = None if raw: - header_dict = {} - deserialized = models.MachineExtensionPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions'} + + def update_table_throughput( + self, resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Update RUs per second of an Azure Cosmos DB Table. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param table_name: Cosmos DB table name. + :type table_name: str + :param update_throughput_parameters: The parameters to provide for the + RUs per second of the current Table. + :type update_throughput_parameters: + ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters + :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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ThroughputSettingsGetResults or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] + :raises: :class:`CloudError` + """ + raw_result = self._update_table_throughput_initial( + resource_group_name=resource_group_name, + account_name=account_name, + table_name=table_name, + update_throughput_parameters=update_throughput_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ThroughputSettingsGetResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_table_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default'} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py index b6ddbca6316a..2e18492dc2e3 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .cost_management_client import CostManagementClient -from .version import VERSION +from ._configuration import CostManagementClientConfiguration +from ._cost_management_client import CostManagementClient +__all__ = ['CostManagementClient', 'CostManagementClientConfiguration'] -__all__ = ['CostManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py new file mode 100644 index 000000000000..56c2e5359a01 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class CostManagementClientConfiguration(AzureConfiguration): + """Configuration for CostManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure Subscription ID. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, 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 not base_url: + base_url = 'https://management.azure.com' + + super(CostManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-costmanagement/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/cost_management_client.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py similarity index 61% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/cost_management_client.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py index cc8458f1727e..448f81211d2b 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/cost_management_client.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/_cost_management_client.py @@ -11,45 +11,13 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.dimensions_operations import DimensionsOperations -from .operations.query_operations import QueryOperations -from .operations.exports_operations import ExportsOperations -from .operations.operations import Operations -from . import models - - -class CostManagementClientConfiguration(AzureConfiguration): - """Configuration for CostManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Azure Subscription ID. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, 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 not base_url: - base_url = 'https://management.azure.com' - - super(CostManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-costmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import CostManagementClientConfiguration +from .operations import DimensionsOperations +from .operations import QueryOperations +from .operations import ExportsOperations +from .operations import Operations +from . import models class CostManagementClient(SDKClient): @@ -82,7 +50,7 @@ def __init__( super(CostManagementClient, 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-01-01' + self.api_version = '2019-10-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py index 1fc845d344b9..983507719d92 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py @@ -10,63 +10,62 @@ # -------------------------------------------------------------------------- try: - from .error_details_py3 import ErrorDetails - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .resource_py3 import Resource - from .dimension_py3 import Dimension - from .query_column_py3 import QueryColumn - from .query_py3 import Query - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .query_time_period_py3 import QueryTimePeriod - from .query_dataset_configuration_py3 import QueryDatasetConfiguration - from .query_aggregation_py3 import QueryAggregation - from .query_grouping_py3 import QueryGrouping - from .query_sorting_configuration_py3 import QuerySortingConfiguration - from .query_comparison_expression_py3 import QueryComparisonExpression - from .query_filter_py3 import QueryFilter - from .query_dataset_py3 import QueryDataset - from .query_definition_py3 import QueryDefinition - from .export_recurrence_period_py3 import ExportRecurrencePeriod - from .export_schedule_py3 import ExportSchedule - from .export_py3 import Export - from .export_list_result_py3 import ExportListResult - from .export_delivery_destination_py3 import ExportDeliveryDestination - from .export_delivery_info_py3 import ExportDeliveryInfo - from .common_export_properties_py3 import CommonExportProperties - from .export_execution_py3 import ExportExecution - from .export_execution_list_result_py3 import ExportExecutionListResult + from ._models_py3 import CommonExportProperties + from ._models_py3 import Dimension + from ._models_py3 import ErrorDetails + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Export + from ._models_py3 import ExportDeliveryDestination + from ._models_py3 import ExportDeliveryInfo + from ._models_py3 import ExportExecution + from ._models_py3 import ExportExecutionListResult + from ._models_py3 import ExportListResult + from ._models_py3 import ExportRecurrencePeriod + from ._models_py3 import ExportSchedule + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import QueryAggregation + from ._models_py3 import QueryColumn + from ._models_py3 import QueryComparisonExpression + from ._models_py3 import QueryDataset + from ._models_py3 import QueryDatasetConfiguration + from ._models_py3 import QueryDefinition + from ._models_py3 import QueryFilter + from ._models_py3 import QueryGrouping + from ._models_py3 import QueryResult + from ._models_py3 import QuerySortingConfiguration + from ._models_py3 import QueryTimePeriod + from ._models_py3 import Resource except (SyntaxError, ImportError): - from .error_details import ErrorDetails - from .error_response import ErrorResponse, ErrorResponseException - from .resource import Resource - from .dimension import Dimension - from .query_column import QueryColumn - from .query import Query - from .operation_display import OperationDisplay - from .operation import Operation - from .query_time_period import QueryTimePeriod - from .query_dataset_configuration import QueryDatasetConfiguration - from .query_aggregation import QueryAggregation - from .query_grouping import QueryGrouping - from .query_sorting_configuration import QuerySortingConfiguration - from .query_comparison_expression import QueryComparisonExpression - from .query_filter import QueryFilter - from .query_dataset import QueryDataset - from .query_definition import QueryDefinition - from .export_recurrence_period import ExportRecurrencePeriod - from .export_schedule import ExportSchedule - from .export import Export - from .export_list_result import ExportListResult - from .export_delivery_destination import ExportDeliveryDestination - from .export_delivery_info import ExportDeliveryInfo - from .common_export_properties import CommonExportProperties - from .export_execution import ExportExecution - from .export_execution_list_result import ExportExecutionListResult -from .dimension_paged import DimensionPaged -from .query_paged import QueryPaged -from .operation_paged import OperationPaged -from .cost_management_client_enums import ( + from ._models import CommonExportProperties + from ._models import Dimension + from ._models import ErrorDetails + from ._models import ErrorResponse, ErrorResponseException + from ._models import Export + from ._models import ExportDeliveryDestination + from ._models import ExportDeliveryInfo + from ._models import ExportExecution + from ._models import ExportExecutionListResult + from ._models import ExportListResult + from ._models import ExportRecurrencePeriod + from ._models import ExportSchedule + from ._models import Operation + from ._models import OperationDisplay + from ._models import QueryAggregation + from ._models import QueryColumn + from ._models import QueryComparisonExpression + from ._models import QueryDataset + from ._models import QueryDatasetConfiguration + from ._models import QueryDefinition + from ._models import QueryFilter + from ._models import QueryGrouping + from ._models import QueryResult + from ._models import QuerySortingConfiguration + from ._models import QueryTimePeriod + from ._models import Resource +from ._paged_models import DimensionPaged +from ._paged_models import OperationPaged +from ._cost_management_client_enums import ( TimeframeType, GranularityType, QueryColumnType, @@ -79,34 +78,33 @@ ) __all__ = [ + 'CommonExportProperties', + 'Dimension', 'ErrorDetails', 'ErrorResponse', 'ErrorResponseException', - 'Resource', - 'Dimension', - 'QueryColumn', - 'Query', - 'OperationDisplay', - 'Operation', - 'QueryTimePeriod', - 'QueryDatasetConfiguration', - 'QueryAggregation', - 'QueryGrouping', - 'QuerySortingConfiguration', - 'QueryComparisonExpression', - 'QueryFilter', - 'QueryDataset', - 'QueryDefinition', - 'ExportRecurrencePeriod', - 'ExportSchedule', 'Export', - 'ExportListResult', 'ExportDeliveryDestination', 'ExportDeliveryInfo', - 'CommonExportProperties', 'ExportExecution', 'ExportExecutionListResult', + 'ExportListResult', + 'ExportRecurrencePeriod', + 'ExportSchedule', + 'Operation', + 'OperationDisplay', + 'QueryAggregation', + 'QueryColumn', + 'QueryComparisonExpression', + 'QueryDataset', + 'QueryDatasetConfiguration', + 'QueryDefinition', + 'QueryFilter', + 'QueryGrouping', + 'QueryResult', + 'QuerySortingConfiguration', + 'QueryTimePeriod', + 'Resource', 'DimensionPaged', - 'QueryPaged', 'OperationPaged', 'TimeframeType', 'GranularityType', diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/cost_management_client_enums.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py similarity index 100% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/cost_management_client_enums.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_cost_management_client_enums.py diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py new file mode 100644 index 000000000000..8ef964a1a53b --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models.py @@ -0,0 +1,946 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CommonExportProperties(Model): + """The common properties of the export. + + All required parameters must be populated in order to send to Azure. + + :param format: The format of the export being delivered. Possible values + include: 'Csv' + :type format: str or ~azure.mgmt.costmanagement.models.FormatType + :param delivery_info: Required. Has delivery information for the export. + :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :param definition: Required. Has definition for the export. + :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition + """ + + _validation = { + 'delivery_info': {'required': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'delivery_info': {'key': 'deliveryInfo', 'type': 'ExportDeliveryInfo'}, + 'definition': {'key': 'definition', 'type': 'QueryDefinition'}, + } + + def __init__(self, **kwargs): + super(CommonExportProperties, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + self.delivery_info = kwargs.get('delivery_info', None) + self.definition = kwargs.get('definition', None) + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + + +class Dimension(Resource): + """Dimension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar description: Dimension description. + :vartype description: str + :ivar filter_enabled: Filter enabled. + :vartype filter_enabled: bool + :ivar grouping_enabled: Grouping enabled. + :vartype grouping_enabled: bool + :param data: + :type data: list[str] + :ivar total: Total number of data for the dimension. + :vartype total: int + :ivar category: Dimension category. + :vartype category: str + :ivar usage_start: Usage start. + :vartype usage_start: datetime + :ivar usage_end: Usage end. + :vartype usage_end: datetime + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'description': {'readonly': True}, + 'filter_enabled': {'readonly': True}, + 'grouping_enabled': {'readonly': True}, + 'total': {'readonly': True}, + 'category': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'filter_enabled': {'key': 'properties.filterEnabled', 'type': 'bool'}, + 'grouping_enabled': {'key': 'properties.groupingEnabled', 'type': 'bool'}, + 'data': {'key': 'properties.data', 'type': '[str]'}, + 'total': {'key': 'properties.total', 'type': 'int'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.description = None + self.filter_enabled = None + self.grouping_enabled = None + self.data = kwargs.get('data', None) + self.total = None + self.category = None + self.usage_start = None + self.usage_end = None + self.next_link = None + + +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.costmanagement.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Export(Resource): + """A export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param format: The format of the export being delivered. Possible values + include: 'Csv' + :type format: str or ~azure.mgmt.costmanagement.models.FormatType + :param delivery_info: Required. Has delivery information for the export. + :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :param definition: Required. Has definition for the export. + :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition + :param schedule: Has schedule information for the export. + :type schedule: ~azure.mgmt.costmanagement.models.ExportSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'delivery_info': {'required': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'ExportDeliveryInfo'}, + 'definition': {'key': 'properties.definition', 'type': 'QueryDefinition'}, + 'schedule': {'key': 'properties.schedule', 'type': 'ExportSchedule'}, + } + + def __init__(self, **kwargs): + super(Export, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + self.delivery_info = kwargs.get('delivery_info', None) + self.definition = kwargs.get('definition', None) + self.schedule = kwargs.get('schedule', None) + + +class ExportDeliveryDestination(Model): + """The destination information for the delivery of the export. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The resource id of the storage account where + exports will be delivered. + :type resource_id: str + :param container: Required. The name of the container where exports will + be uploaded. + :type container: str + :param root_folder_path: The name of the directory where exports will be + uploaded. + :type root_folder_path: str + """ + + _validation = { + 'resource_id': {'required': True}, + 'container': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'container': {'key': 'container', 'type': 'str'}, + 'root_folder_path': {'key': 'rootFolderPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExportDeliveryDestination, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.container = kwargs.get('container', None) + self.root_folder_path = kwargs.get('root_folder_path', None) + + +class ExportDeliveryInfo(Model): + """The delivery information associated with a export. + + All required parameters must be populated in order to send to Azure. + + :param destination: Required. Has destination for the export being + delivered. + :type destination: + ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + """ + + _validation = { + 'destination': {'required': True}, + } + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'ExportDeliveryDestination'}, + } + + def __init__(self, **kwargs): + super(ExportDeliveryInfo, self).__init__(**kwargs) + self.destination = kwargs.get('destination', None) + + +class ExportExecution(Resource): + """A export execution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param execution_type: The type of the export execution. Possible values + include: 'OnDemand', 'Scheduled' + :type execution_type: str or + ~azure.mgmt.costmanagement.models.ExecutionType + :param status: The status of the export execution. Possible values + include: 'Queued', 'InProgress', 'Completed', 'Failed', 'Timeout', + 'NewDataNotAvailable', 'DataNotAvailable' + :type status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus + :param submitted_by: The identifier for the entity that executed the + export. For OnDemand executions, it is the email id. For Scheduled + executions, it is the constant value - System. + :type submitted_by: str + :param submitted_time: The time when export was queued to be executed. + :type submitted_time: datetime + :param processing_start_time: The time when export was picked up to be + executed. + :type processing_start_time: datetime + :param processing_end_time: The time when export execution finished. + :type processing_end_time: datetime + :param file_name: The name of the file export got written to. + :type file_name: str + :param run_settings: + :type run_settings: + ~azure.mgmt.costmanagement.models.CommonExportProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'execution_type': {'key': 'properties.executionType', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'submitted_by': {'key': 'properties.submittedBy', 'type': 'str'}, + 'submitted_time': {'key': 'properties.submittedTime', 'type': 'iso-8601'}, + 'processing_start_time': {'key': 'properties.processingStartTime', 'type': 'iso-8601'}, + 'processing_end_time': {'key': 'properties.processingEndTime', 'type': 'iso-8601'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'run_settings': {'key': 'properties.runSettings', 'type': 'CommonExportProperties'}, + } + + def __init__(self, **kwargs): + super(ExportExecution, self).__init__(**kwargs) + self.execution_type = kwargs.get('execution_type', None) + self.status = kwargs.get('status', None) + self.submitted_by = kwargs.get('submitted_by', None) + self.submitted_time = kwargs.get('submitted_time', None) + self.processing_start_time = kwargs.get('processing_start_time', None) + self.processing_end_time = kwargs.get('processing_end_time', None) + self.file_name = kwargs.get('file_name', None) + self.run_settings = kwargs.get('run_settings', None) + + +class ExportExecutionListResult(Model): + """Result of listing exports execution history of a export by name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of export executions. + :vartype value: list[~azure.mgmt.costmanagement.models.ExportExecution] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExportExecution]'}, + } + + def __init__(self, **kwargs): + super(ExportExecutionListResult, self).__init__(**kwargs) + self.value = None + + +class ExportListResult(Model): + """Result of listing exports. It contains a list of available exports in the + scope provided. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of exports. + :vartype value: list[~azure.mgmt.costmanagement.models.Export] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Export]'}, + } + + def __init__(self, **kwargs): + super(ExportListResult, self).__init__(**kwargs) + self.value = None + + +class ExportRecurrencePeriod(Model): + """The start and end date for recurrence schedule. + + All required parameters must be populated in order to send to Azure. + + :param from_property: Required. The start date of recurrence. + :type from_property: datetime + :param to: The end date of recurrence. + :type to: datetime + """ + + _validation = { + 'from_property': {'required': True}, + } + + _attribute_map = { + 'from_property': {'key': 'from', 'type': 'iso-8601'}, + 'to': {'key': 'to', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ExportRecurrencePeriod, self).__init__(**kwargs) + self.from_property = kwargs.get('from_property', None) + self.to = kwargs.get('to', None) + + +class ExportSchedule(Model): + """The schedule associated with a export. + + All required parameters must be populated in order to send to Azure. + + :param status: The status of the schedule. Whether active or not. If + inactive, the export's scheduled execution is paused. Possible values + include: 'Active', 'Inactive' + :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :param recurrence: Required. The schedule recurrence. Possible values + include: 'Daily', 'Weekly', 'Monthly', 'Annually' + :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :param recurrence_period: Has start and end date of the recurrence. The + start date must be in future. If present, the end date must be greater + than start date. + :type recurrence_period: + ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + """ + + _validation = { + 'recurrence': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'recurrence': {'key': 'recurrence', 'type': 'str'}, + 'recurrence_period': {'key': 'recurrencePeriod', 'type': 'ExportRecurrencePeriod'}, + } + + def __init__(self, **kwargs): + super(ExportSchedule, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.recurrence = kwargs.get('recurrence', None) + self.recurrence_period = kwargs.get('recurrence_period', None) + + +class Operation(Model): + """A Cost management REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.costmanagement.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.CostManagement. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Dimensions, + Query. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class QueryAggregation(Model): + """The aggregation expression to be used in the query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the column to aggregate. + :type name: str + :ivar function: Required. The name of the aggregation function to use. + Default value: "Sum" . + :vartype function: str + """ + + _validation = { + 'name': {'required': True}, + 'function': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'function': {'key': 'function', 'type': 'str'}, + } + + function = "Sum" + + def __init__(self, **kwargs): + super(QueryAggregation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class QueryColumn(Model): + """QueryColumn. + + :param name: The name of column. + :type name: str + :param type: The type of column. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryColumn, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class QueryComparisonExpression(Model): + """The comparison expression to be used in the query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the column to use in comparison. + :type name: str + :ivar operator: Required. The operator to use for comparison. Default + value: "In" . + :vartype operator: str + :param values: Required. Array of values to use for comparison + :type values: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'operator': {'required': True, 'constant': True}, + 'values': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + operator = "In" + + def __init__(self, **kwargs): + super(QueryComparisonExpression, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.values = kwargs.get('values', None) + + +class QueryDataset(Model): + """The definition of data present in the query. + + :param granularity: The granularity of rows in the query. Possible values + include: 'Daily', 'Hourly' + :type granularity: str or + ~azure.mgmt.costmanagement.models.GranularityType + :param configuration: Has configuration information for the data in the + export. The configuration will be ignored if aggregation and grouping are + provided. + :type configuration: + ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :param aggregation: Dictionary of aggregation expression to use in the + query. The key of each item in the dictionary is the alias for the + aggregated column. Query can have up to 2 aggregation clauses. + :type aggregation: dict[str, + ~azure.mgmt.costmanagement.models.QueryAggregation] + :param grouping: Array of group by expression to use in the query. Query + can have up to 2 group by clauses. + :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] + :param sorting: Array of sorting by columns in query. + :type sorting: + list[~azure.mgmt.costmanagement.models.QuerySortingConfiguration] + :param filter: Has filter expression to use in the query. + :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + """ + + _validation = { + 'grouping': {'max_items': 2}, + } + + _attribute_map = { + 'granularity': {'key': 'granularity', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'QueryDatasetConfiguration'}, + 'aggregation': {'key': 'aggregation', 'type': '{QueryAggregation}'}, + 'grouping': {'key': 'grouping', 'type': '[QueryGrouping]'}, + 'sorting': {'key': 'sorting', 'type': '[QuerySortingConfiguration]'}, + 'filter': {'key': 'filter', 'type': 'QueryFilter'}, + } + + def __init__(self, **kwargs): + super(QueryDataset, self).__init__(**kwargs) + self.granularity = kwargs.get('granularity', None) + self.configuration = kwargs.get('configuration', None) + self.aggregation = kwargs.get('aggregation', None) + self.grouping = kwargs.get('grouping', None) + self.sorting = kwargs.get('sorting', None) + self.filter = kwargs.get('filter', None) + + +class QueryDatasetConfiguration(Model): + """The configuration of dataset in the query. + + :param columns: Array of column names to be included in the query. Any + valid query column name is allowed. If not provided, then query includes + all columns. + :type columns: list[str] + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(QueryDatasetConfiguration, self).__init__(**kwargs) + self.columns = kwargs.get('columns', None) + + +class QueryDefinition(Model): + """The definition of a query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of the query. Default value: "Usage" . + :vartype type: str + :param timeframe: Required. The time frame for pulling data for the query. + If custom, then a specific time period must be provided. Possible values + include: 'WeekToDate', 'MonthToDate', 'YearToDate', 'TheLastWeek', + 'TheLastMonth', 'TheLastYear', 'Custom' + :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :param time_period: Has time period for pulling data for the query. + :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :param dataset: Has definition for data in this query. + :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'timeframe': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'timeframe': {'key': 'timeframe', 'type': 'str'}, + 'time_period': {'key': 'timePeriod', 'type': 'QueryTimePeriod'}, + 'dataset': {'key': 'dataset', 'type': 'QueryDataset'}, + } + + type = "Usage" + + def __init__(self, **kwargs): + super(QueryDefinition, self).__init__(**kwargs) + self.timeframe = kwargs.get('timeframe', None) + self.time_period = kwargs.get('time_period', None) + self.dataset = kwargs.get('dataset', None) + + +class QueryFilter(Model): + """The filter expression to be used in the export. + + :param and_property: The logical "AND" expression. Must have at least 2 + items. + :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :param or_property: The logical "OR" expression. Must have at least 2 + items. + :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :param not_property: The logical "NOT" expression. + :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter + :param dimension: Has comparison expression for a dimension + :type dimension: + ~azure.mgmt.costmanagement.models.QueryComparisonExpression + :param tag: Has comparison expression for a tag + :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + """ + + _validation = { + 'and_property': {'min_items': 2}, + 'or_property': {'min_items': 2}, + } + + _attribute_map = { + 'and_property': {'key': 'and', 'type': '[QueryFilter]'}, + 'or_property': {'key': 'or', 'type': '[QueryFilter]'}, + 'not_property': {'key': 'not', 'type': 'QueryFilter'}, + 'dimension': {'key': 'dimension', 'type': 'QueryComparisonExpression'}, + 'tag': {'key': 'tag', 'type': 'QueryComparisonExpression'}, + } + + def __init__(self, **kwargs): + super(QueryFilter, self).__init__(**kwargs) + self.and_property = kwargs.get('and_property', None) + self.or_property = kwargs.get('or_property', None) + self.not_property = kwargs.get('not_property', None) + self.dimension = kwargs.get('dimension', None) + self.tag = kwargs.get('tag', None) + + +class QueryGrouping(Model): + """The group by expression to be used in the query. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Has type of the column to group. Possible values + include: 'Tag', 'Dimension' + :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType + :param name: Required. The name of the column to group. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryGrouping, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + + +class QueryResult(Resource): + """Result of query. It contains all columns listed under groupings and + aggregation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param next_link: The link (url) to the next page of results. + :type next_link: str + :param columns: Array of columns + :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] + :param rows: Array of rows + :type rows: list[list[object]] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[QueryColumn]'}, + 'rows': {'key': 'properties.rows', 'type': '[[object]]'}, + } + + def __init__(self, **kwargs): + super(QueryResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.columns = kwargs.get('columns', None) + self.rows = kwargs.get('rows', None) + + +class QuerySortingConfiguration(Model): + """The configuration for sorting in the query. + + :param query_sorting_direction: The sorting direction. Possible values + include: 'Ascending', 'Descending' + :type query_sorting_direction: str or + ~azure.mgmt.costmanagement.models.SortDirection + :param name: The name of the column to use in sorting. + :type name: str + """ + + _attribute_map = { + 'query_sorting_direction': {'key': 'querySortingDirection', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QuerySortingConfiguration, self).__init__(**kwargs) + self.query_sorting_direction = kwargs.get('query_sorting_direction', None) + self.name = kwargs.get('name', None) + + +class QueryTimePeriod(Model): + """The start and end date for pulling data for the query. + + All required parameters must be populated in order to send to Azure. + + :param from_property: Required. The start date to pull data from. + :type from_property: datetime + :param to: Required. The end date to pull data to. + :type to: datetime + """ + + _validation = { + 'from_property': {'required': True}, + 'to': {'required': True}, + } + + _attribute_map = { + 'from_property': {'key': 'from', 'type': 'iso-8601'}, + 'to': {'key': 'to', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(QueryTimePeriod, self).__init__(**kwargs) + self.from_property = kwargs.get('from_property', None) + self.to = kwargs.get('to', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py new file mode 100644 index 000000000000..07e7ca0d3b2c --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_models_py3.py @@ -0,0 +1,946 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CommonExportProperties(Model): + """The common properties of the export. + + All required parameters must be populated in order to send to Azure. + + :param format: The format of the export being delivered. Possible values + include: 'Csv' + :type format: str or ~azure.mgmt.costmanagement.models.FormatType + :param delivery_info: Required. Has delivery information for the export. + :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :param definition: Required. Has definition for the export. + :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition + """ + + _validation = { + 'delivery_info': {'required': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'delivery_info': {'key': 'deliveryInfo', 'type': 'ExportDeliveryInfo'}, + 'definition': {'key': 'definition', 'type': 'QueryDefinition'}, + } + + def __init__(self, *, delivery_info, definition, format=None, **kwargs) -> None: + super(CommonExportProperties, self).__init__(**kwargs) + self.format = format + self.delivery_info = delivery_info + self.definition = definition + + +class Resource(Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.tags = None + + +class Dimension(Resource): + """Dimension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar description: Dimension description. + :vartype description: str + :ivar filter_enabled: Filter enabled. + :vartype filter_enabled: bool + :ivar grouping_enabled: Grouping enabled. + :vartype grouping_enabled: bool + :param data: + :type data: list[str] + :ivar total: Total number of data for the dimension. + :vartype total: int + :ivar category: Dimension category. + :vartype category: str + :ivar usage_start: Usage start. + :vartype usage_start: datetime + :ivar usage_end: Usage end. + :vartype usage_end: datetime + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'description': {'readonly': True}, + 'filter_enabled': {'readonly': True}, + 'grouping_enabled': {'readonly': True}, + 'total': {'readonly': True}, + 'category': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'filter_enabled': {'key': 'properties.filterEnabled', 'type': 'bool'}, + 'grouping_enabled': {'key': 'properties.groupingEnabled', 'type': 'bool'}, + 'data': {'key': 'properties.data', 'type': '[str]'}, + 'total': {'key': 'properties.total', 'type': 'int'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + } + + def __init__(self, *, data=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.description = None + self.filter_enabled = None + self.grouping_enabled = None + self.data = data + self.total = None + self.category = None + self.usage_start = None + self.usage_end = None + self.next_link = None + + +class ErrorDetails(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ErrorResponse(Model): + """Error response indicates that the service is not able to process the + incoming request. The reason is provided in the error message. + + :param error: The details of the error. + :type error: ~azure.mgmt.costmanagement.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Export(Resource): + """A export resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param format: The format of the export being delivered. Possible values + include: 'Csv' + :type format: str or ~azure.mgmt.costmanagement.models.FormatType + :param delivery_info: Required. Has delivery information for the export. + :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo + :param definition: Required. Has definition for the export. + :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition + :param schedule: Has schedule information for the export. + :type schedule: ~azure.mgmt.costmanagement.models.ExportSchedule + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'delivery_info': {'required': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'format': {'key': 'properties.format', 'type': 'str'}, + 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'ExportDeliveryInfo'}, + 'definition': {'key': 'properties.definition', 'type': 'QueryDefinition'}, + 'schedule': {'key': 'properties.schedule', 'type': 'ExportSchedule'}, + } + + def __init__(self, *, delivery_info, definition, format=None, schedule=None, **kwargs) -> None: + super(Export, self).__init__(**kwargs) + self.format = format + self.delivery_info = delivery_info + self.definition = definition + self.schedule = schedule + + +class ExportDeliveryDestination(Model): + """The destination information for the delivery of the export. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The resource id of the storage account where + exports will be delivered. + :type resource_id: str + :param container: Required. The name of the container where exports will + be uploaded. + :type container: str + :param root_folder_path: The name of the directory where exports will be + uploaded. + :type root_folder_path: str + """ + + _validation = { + 'resource_id': {'required': True}, + 'container': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'container': {'key': 'container', 'type': 'str'}, + 'root_folder_path': {'key': 'rootFolderPath', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str, container: str, root_folder_path: str=None, **kwargs) -> None: + super(ExportDeliveryDestination, self).__init__(**kwargs) + self.resource_id = resource_id + self.container = container + self.root_folder_path = root_folder_path + + +class ExportDeliveryInfo(Model): + """The delivery information associated with a export. + + All required parameters must be populated in order to send to Azure. + + :param destination: Required. Has destination for the export being + delivered. + :type destination: + ~azure.mgmt.costmanagement.models.ExportDeliveryDestination + """ + + _validation = { + 'destination': {'required': True}, + } + + _attribute_map = { + 'destination': {'key': 'destination', 'type': 'ExportDeliveryDestination'}, + } + + def __init__(self, *, destination, **kwargs) -> None: + super(ExportDeliveryInfo, self).__init__(**kwargs) + self.destination = destination + + +class ExportExecution(Resource): + """A export execution. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param execution_type: The type of the export execution. Possible values + include: 'OnDemand', 'Scheduled' + :type execution_type: str or + ~azure.mgmt.costmanagement.models.ExecutionType + :param status: The status of the export execution. Possible values + include: 'Queued', 'InProgress', 'Completed', 'Failed', 'Timeout', + 'NewDataNotAvailable', 'DataNotAvailable' + :type status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus + :param submitted_by: The identifier for the entity that executed the + export. For OnDemand executions, it is the email id. For Scheduled + executions, it is the constant value - System. + :type submitted_by: str + :param submitted_time: The time when export was queued to be executed. + :type submitted_time: datetime + :param processing_start_time: The time when export was picked up to be + executed. + :type processing_start_time: datetime + :param processing_end_time: The time when export execution finished. + :type processing_end_time: datetime + :param file_name: The name of the file export got written to. + :type file_name: str + :param run_settings: + :type run_settings: + ~azure.mgmt.costmanagement.models.CommonExportProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'execution_type': {'key': 'properties.executionType', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'submitted_by': {'key': 'properties.submittedBy', 'type': 'str'}, + 'submitted_time': {'key': 'properties.submittedTime', 'type': 'iso-8601'}, + 'processing_start_time': {'key': 'properties.processingStartTime', 'type': 'iso-8601'}, + 'processing_end_time': {'key': 'properties.processingEndTime', 'type': 'iso-8601'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'run_settings': {'key': 'properties.runSettings', 'type': 'CommonExportProperties'}, + } + + def __init__(self, *, execution_type=None, status=None, submitted_by: str=None, submitted_time=None, processing_start_time=None, processing_end_time=None, file_name: str=None, run_settings=None, **kwargs) -> None: + super(ExportExecution, self).__init__(**kwargs) + self.execution_type = execution_type + self.status = status + self.submitted_by = submitted_by + self.submitted_time = submitted_time + self.processing_start_time = processing_start_time + self.processing_end_time = processing_end_time + self.file_name = file_name + self.run_settings = run_settings + + +class ExportExecutionListResult(Model): + """Result of listing exports execution history of a export by name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of export executions. + :vartype value: list[~azure.mgmt.costmanagement.models.ExportExecution] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExportExecution]'}, + } + + def __init__(self, **kwargs) -> None: + super(ExportExecutionListResult, self).__init__(**kwargs) + self.value = None + + +class ExportListResult(Model): + """Result of listing exports. It contains a list of available exports in the + scope provided. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of exports. + :vartype value: list[~azure.mgmt.costmanagement.models.Export] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Export]'}, + } + + def __init__(self, **kwargs) -> None: + super(ExportListResult, self).__init__(**kwargs) + self.value = None + + +class ExportRecurrencePeriod(Model): + """The start and end date for recurrence schedule. + + All required parameters must be populated in order to send to Azure. + + :param from_property: Required. The start date of recurrence. + :type from_property: datetime + :param to: The end date of recurrence. + :type to: datetime + """ + + _validation = { + 'from_property': {'required': True}, + } + + _attribute_map = { + 'from_property': {'key': 'from', 'type': 'iso-8601'}, + 'to': {'key': 'to', 'type': 'iso-8601'}, + } + + def __init__(self, *, from_property, to=None, **kwargs) -> None: + super(ExportRecurrencePeriod, self).__init__(**kwargs) + self.from_property = from_property + self.to = to + + +class ExportSchedule(Model): + """The schedule associated with a export. + + All required parameters must be populated in order to send to Azure. + + :param status: The status of the schedule. Whether active or not. If + inactive, the export's scheduled execution is paused. Possible values + include: 'Active', 'Inactive' + :type status: str or ~azure.mgmt.costmanagement.models.StatusType + :param recurrence: Required. The schedule recurrence. Possible values + include: 'Daily', 'Weekly', 'Monthly', 'Annually' + :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType + :param recurrence_period: Has start and end date of the recurrence. The + start date must be in future. If present, the end date must be greater + than start date. + :type recurrence_period: + ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod + """ + + _validation = { + 'recurrence': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'recurrence': {'key': 'recurrence', 'type': 'str'}, + 'recurrence_period': {'key': 'recurrencePeriod', 'type': 'ExportRecurrencePeriod'}, + } + + def __init__(self, *, recurrence, status=None, recurrence_period=None, **kwargs) -> None: + super(ExportSchedule, self).__init__(**kwargs) + self.status = status + self.recurrence = recurrence + self.recurrence_period = recurrence_period + + +class Operation(Model): + """A Cost management REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.costmanagement.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft.CostManagement. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Dimensions, + Query. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class QueryAggregation(Model): + """The aggregation expression to be used in the query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the column to aggregate. + :type name: str + :ivar function: Required. The name of the aggregation function to use. + Default value: "Sum" . + :vartype function: str + """ + + _validation = { + 'name': {'required': True}, + 'function': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'function': {'key': 'function', 'type': 'str'}, + } + + function = "Sum" + + def __init__(self, *, name: str, **kwargs) -> None: + super(QueryAggregation, self).__init__(**kwargs) + self.name = name + + +class QueryColumn(Model): + """QueryColumn. + + :param name: The name of column. + :type name: str + :param type: The type of column. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(QueryColumn, self).__init__(**kwargs) + self.name = name + self.type = type + + +class QueryComparisonExpression(Model): + """The comparison expression to be used in the query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the column to use in comparison. + :type name: str + :ivar operator: Required. The operator to use for comparison. Default + value: "In" . + :vartype operator: str + :param values: Required. Array of values to use for comparison + :type values: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'operator': {'required': True, 'constant': True}, + 'values': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + operator = "In" + + def __init__(self, *, name: str, values, **kwargs) -> None: + super(QueryComparisonExpression, self).__init__(**kwargs) + self.name = name + self.values = values + + +class QueryDataset(Model): + """The definition of data present in the query. + + :param granularity: The granularity of rows in the query. Possible values + include: 'Daily', 'Hourly' + :type granularity: str or + ~azure.mgmt.costmanagement.models.GranularityType + :param configuration: Has configuration information for the data in the + export. The configuration will be ignored if aggregation and grouping are + provided. + :type configuration: + ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration + :param aggregation: Dictionary of aggregation expression to use in the + query. The key of each item in the dictionary is the alias for the + aggregated column. Query can have up to 2 aggregation clauses. + :type aggregation: dict[str, + ~azure.mgmt.costmanagement.models.QueryAggregation] + :param grouping: Array of group by expression to use in the query. Query + can have up to 2 group by clauses. + :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] + :param sorting: Array of sorting by columns in query. + :type sorting: + list[~azure.mgmt.costmanagement.models.QuerySortingConfiguration] + :param filter: Has filter expression to use in the query. + :type filter: ~azure.mgmt.costmanagement.models.QueryFilter + """ + + _validation = { + 'grouping': {'max_items': 2}, + } + + _attribute_map = { + 'granularity': {'key': 'granularity', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'QueryDatasetConfiguration'}, + 'aggregation': {'key': 'aggregation', 'type': '{QueryAggregation}'}, + 'grouping': {'key': 'grouping', 'type': '[QueryGrouping]'}, + 'sorting': {'key': 'sorting', 'type': '[QuerySortingConfiguration]'}, + 'filter': {'key': 'filter', 'type': 'QueryFilter'}, + } + + def __init__(self, *, granularity=None, configuration=None, aggregation=None, grouping=None, sorting=None, filter=None, **kwargs) -> None: + super(QueryDataset, self).__init__(**kwargs) + self.granularity = granularity + self.configuration = configuration + self.aggregation = aggregation + self.grouping = grouping + self.sorting = sorting + self.filter = filter + + +class QueryDatasetConfiguration(Model): + """The configuration of dataset in the query. + + :param columns: Array of column names to be included in the query. Any + valid query column name is allowed. If not provided, then query includes + all columns. + :type columns: list[str] + """ + + _attribute_map = { + 'columns': {'key': 'columns', 'type': '[str]'}, + } + + def __init__(self, *, columns=None, **kwargs) -> None: + super(QueryDatasetConfiguration, self).__init__(**kwargs) + self.columns = columns + + +class QueryDefinition(Model): + """The definition of a query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The type of the query. Default value: "Usage" . + :vartype type: str + :param timeframe: Required. The time frame for pulling data for the query. + If custom, then a specific time period must be provided. Possible values + include: 'WeekToDate', 'MonthToDate', 'YearToDate', 'TheLastWeek', + 'TheLastMonth', 'TheLastYear', 'Custom' + :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType + :param time_period: Has time period for pulling data for the query. + :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod + :param dataset: Has definition for data in this query. + :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'timeframe': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'timeframe': {'key': 'timeframe', 'type': 'str'}, + 'time_period': {'key': 'timePeriod', 'type': 'QueryTimePeriod'}, + 'dataset': {'key': 'dataset', 'type': 'QueryDataset'}, + } + + type = "Usage" + + def __init__(self, *, timeframe, time_period=None, dataset=None, **kwargs) -> None: + super(QueryDefinition, self).__init__(**kwargs) + self.timeframe = timeframe + self.time_period = time_period + self.dataset = dataset + + +class QueryFilter(Model): + """The filter expression to be used in the export. + + :param and_property: The logical "AND" expression. Must have at least 2 + items. + :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :param or_property: The logical "OR" expression. Must have at least 2 + items. + :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] + :param not_property: The logical "NOT" expression. + :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter + :param dimension: Has comparison expression for a dimension + :type dimension: + ~azure.mgmt.costmanagement.models.QueryComparisonExpression + :param tag: Has comparison expression for a tag + :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression + """ + + _validation = { + 'and_property': {'min_items': 2}, + 'or_property': {'min_items': 2}, + } + + _attribute_map = { + 'and_property': {'key': 'and', 'type': '[QueryFilter]'}, + 'or_property': {'key': 'or', 'type': '[QueryFilter]'}, + 'not_property': {'key': 'not', 'type': 'QueryFilter'}, + 'dimension': {'key': 'dimension', 'type': 'QueryComparisonExpression'}, + 'tag': {'key': 'tag', 'type': 'QueryComparisonExpression'}, + } + + def __init__(self, *, and_property=None, or_property=None, not_property=None, dimension=None, tag=None, **kwargs) -> None: + super(QueryFilter, self).__init__(**kwargs) + self.and_property = and_property + self.or_property = or_property + self.not_property = not_property + self.dimension = dimension + self.tag = tag + + +class QueryGrouping(Model): + """The group by expression to be used in the query. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Has type of the column to group. Possible values + include: 'Tag', 'Dimension' + :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType + :param name: Required. The name of the column to group. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, type, name: str, **kwargs) -> None: + super(QueryGrouping, self).__init__(**kwargs) + self.type = type + self.name = name + + +class QueryResult(Resource): + """Result of query. It contains all columns listed under groupings and + aggregation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param next_link: The link (url) to the next page of results. + :type next_link: str + :param columns: Array of columns + :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] + :param rows: Array of rows + :type rows: list[list[object]] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'columns': {'key': 'properties.columns', 'type': '[QueryColumn]'}, + 'rows': {'key': 'properties.rows', 'type': '[[object]]'}, + } + + def __init__(self, *, next_link: str=None, columns=None, rows=None, **kwargs) -> None: + super(QueryResult, self).__init__(**kwargs) + self.next_link = next_link + self.columns = columns + self.rows = rows + + +class QuerySortingConfiguration(Model): + """The configuration for sorting in the query. + + :param query_sorting_direction: The sorting direction. Possible values + include: 'Ascending', 'Descending' + :type query_sorting_direction: str or + ~azure.mgmt.costmanagement.models.SortDirection + :param name: The name of the column to use in sorting. + :type name: str + """ + + _attribute_map = { + 'query_sorting_direction': {'key': 'querySortingDirection', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, query_sorting_direction=None, name: str=None, **kwargs) -> None: + super(QuerySortingConfiguration, self).__init__(**kwargs) + self.query_sorting_direction = query_sorting_direction + self.name = name + + +class QueryTimePeriod(Model): + """The start and end date for pulling data for the query. + + All required parameters must be populated in order to send to Azure. + + :param from_property: Required. The start date to pull data from. + :type from_property: datetime + :param to: Required. The end date to pull data to. + :type to: datetime + """ + + _validation = { + 'from_property': {'required': True}, + 'to': {'required': True}, + } + + _attribute_map = { + 'from_property': {'key': 'from', 'type': 'iso-8601'}, + 'to': {'key': 'to', 'type': 'iso-8601'}, + } + + def __init__(self, *, from_property, to, **kwargs) -> None: + super(QueryTimePeriod, self).__init__(**kwargs) + self.from_property = from_property + self.to = to diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension_paged.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_paged_models.py similarity index 68% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension_paged.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_paged_models.py index ef41cfaa70f2..7f38fa645767 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension_paged.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/_paged_models.py @@ -25,3 +25,16 @@ class DimensionPaged(Paged): def __init__(self, *args, **kwargs): super(DimensionPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/common_export_properties.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/common_export_properties.py deleted file mode 100644 index 9024a61aeff2..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/common_export_properties.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CommonExportProperties(Model): - """The common properties of the export. - - All required parameters must be populated in order to send to Azure. - - :param format: The format of the export being delivered. Possible values - include: 'Csv' - :type format: str or ~azure.mgmt.costmanagement.models.FormatType - :param delivery_info: Required. Has delivery information for the export. - :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :param definition: Required. Has definition for the export. - :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition - """ - - _validation = { - 'delivery_info': {'required': True}, - 'definition': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'delivery_info': {'key': 'deliveryInfo', 'type': 'ExportDeliveryInfo'}, - 'definition': {'key': 'definition', 'type': 'QueryDefinition'}, - } - - def __init__(self, **kwargs): - super(CommonExportProperties, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.delivery_info = kwargs.get('delivery_info', None) - self.definition = kwargs.get('definition', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/common_export_properties_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/common_export_properties_py3.py deleted file mode 100644 index 6841ba2a2dce..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/common_export_properties_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CommonExportProperties(Model): - """The common properties of the export. - - All required parameters must be populated in order to send to Azure. - - :param format: The format of the export being delivered. Possible values - include: 'Csv' - :type format: str or ~azure.mgmt.costmanagement.models.FormatType - :param delivery_info: Required. Has delivery information for the export. - :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :param definition: Required. Has definition for the export. - :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition - """ - - _validation = { - 'delivery_info': {'required': True}, - 'definition': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'delivery_info': {'key': 'deliveryInfo', 'type': 'ExportDeliveryInfo'}, - 'definition': {'key': 'definition', 'type': 'QueryDefinition'}, - } - - def __init__(self, *, delivery_info, definition, format=None, **kwargs) -> None: - super(CommonExportProperties, self).__init__(**kwargs) - self.format = format - self.delivery_info = delivery_info - self.definition = definition diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension.py deleted file mode 100644 index 8a54c783616d..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Dimension(Resource): - """Dimension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param description: - :type description: str - :param filter_enabled: - :type filter_enabled: bool - :param grouping_enabled: - :type grouping_enabled: bool - :param data: - :type data: list[str] - :param total: - :type total: int - :param category: - :type category: str - :param usage_start: - :type usage_start: datetime - :param usage_end: - :type usage_end: datetime - :param next_link: - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'filter_enabled': {'key': 'properties.filterEnabled', 'type': 'bool'}, - 'grouping_enabled': {'key': 'properties.groupingEnabled', 'type': 'bool'}, - 'data': {'key': 'properties.data', 'type': '[str]'}, - 'total': {'key': 'properties.total', 'type': 'int'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Dimension, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.filter_enabled = kwargs.get('filter_enabled', None) - self.grouping_enabled = kwargs.get('grouping_enabled', None) - self.data = kwargs.get('data', None) - self.total = kwargs.get('total', None) - self.category = kwargs.get('category', None) - self.usage_start = kwargs.get('usage_start', None) - self.usage_end = kwargs.get('usage_end', None) - self.next_link = kwargs.get('next_link', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension_py3.py deleted file mode 100644 index ae7f8d7ca51f..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/dimension_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Dimension(Resource): - """Dimension. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param description: - :type description: str - :param filter_enabled: - :type filter_enabled: bool - :param grouping_enabled: - :type grouping_enabled: bool - :param data: - :type data: list[str] - :param total: - :type total: int - :param category: - :type category: str - :param usage_start: - :type usage_start: datetime - :param usage_end: - :type usage_end: datetime - :param next_link: - :type next_link: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'filter_enabled': {'key': 'properties.filterEnabled', 'type': 'bool'}, - 'grouping_enabled': {'key': 'properties.groupingEnabled', 'type': 'bool'}, - 'data': {'key': 'properties.data', 'type': '[str]'}, - 'total': {'key': 'properties.total', 'type': 'int'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, filter_enabled: bool=None, grouping_enabled: bool=None, data=None, total: int=None, category: str=None, usage_start=None, usage_end=None, next_link: str=None, **kwargs) -> None: - super(Dimension, self).__init__(**kwargs) - self.description = description - self.filter_enabled = filter_enabled - self.grouping_enabled = grouping_enabled - self.data = data - self.total = total - self.category = category - self.usage_start = usage_start - self.usage_end = usage_end - self.next_link = next_link diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_details.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_details.py deleted file mode 100644 index 03f3e23d2153..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_details.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """The details of the error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_details_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_details_py3.py deleted file mode 100644 index f9e1adeac9fe..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_details_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetails(Model): - """The details of the error. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_response.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_response.py deleted file mode 100644 index 981621ff3605..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.costmanagement.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_response_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_response_py3.py deleted file mode 100644 index 5d3046468167..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/error_response_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response indicates that the service is not able to process the - incoming request. The reason is provided in the error message. - - :param error: The details of the error. - :type error: ~azure.mgmt.costmanagement.models.ErrorDetails - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export.py deleted file mode 100644 index 9ec61149f406..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Export(Resource): - """A export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param format: The format of the export being delivered. Possible values - include: 'Csv' - :type format: str or ~azure.mgmt.costmanagement.models.FormatType - :param delivery_info: Required. Has delivery information for the export. - :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :param definition: Required. Has definition for the export. - :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition - :param schedule: Has schedule information for the export. - :type schedule: ~azure.mgmt.costmanagement.models.ExportSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'delivery_info': {'required': True}, - 'definition': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'ExportDeliveryInfo'}, - 'definition': {'key': 'properties.definition', 'type': 'QueryDefinition'}, - 'schedule': {'key': 'properties.schedule', 'type': 'ExportSchedule'}, - } - - def __init__(self, **kwargs): - super(Export, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.delivery_info = kwargs.get('delivery_info', None) - self.definition = kwargs.get('definition', None) - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_destination.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_destination.py deleted file mode 100644 index 949d25357d8e..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_destination.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDeliveryDestination(Model): - """The destination information for the delivery of the export. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The resource id of the storage account where - exports will be delivered. - :type resource_id: str - :param container: Required. The name of the container where exports will - be uploaded. - :type container: str - :param root_folder_path: The name of the directory where exports will be - uploaded. - :type root_folder_path: str - """ - - _validation = { - 'resource_id': {'required': True}, - 'container': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'str'}, - 'root_folder_path': {'key': 'rootFolderPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExportDeliveryDestination, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.container = kwargs.get('container', None) - self.root_folder_path = kwargs.get('root_folder_path', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_destination_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_destination_py3.py deleted file mode 100644 index 3f2f70bffd4a..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_destination_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDeliveryDestination(Model): - """The destination information for the delivery of the export. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The resource id of the storage account where - exports will be delivered. - :type resource_id: str - :param container: Required. The name of the container where exports will - be uploaded. - :type container: str - :param root_folder_path: The name of the directory where exports will be - uploaded. - :type root_folder_path: str - """ - - _validation = { - 'resource_id': {'required': True}, - 'container': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'str'}, - 'root_folder_path': {'key': 'rootFolderPath', 'type': 'str'}, - } - - def __init__(self, *, resource_id: str, container: str, root_folder_path: str=None, **kwargs) -> None: - super(ExportDeliveryDestination, self).__init__(**kwargs) - self.resource_id = resource_id - self.container = container - self.root_folder_path = root_folder_path diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_info.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_info.py deleted file mode 100644 index 996aa73156d6..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_info.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDeliveryInfo(Model): - """The delivery information associated with a export. - - All required parameters must be populated in order to send to Azure. - - :param destination: Required. Has destination for the export being - delivered. - :type destination: - ~azure.mgmt.costmanagement.models.ExportDeliveryDestination - """ - - _validation = { - 'destination': {'required': True}, - } - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'ExportDeliveryDestination'}, - } - - def __init__(self, **kwargs): - super(ExportDeliveryInfo, self).__init__(**kwargs) - self.destination = kwargs.get('destination', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_info_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_info_py3.py deleted file mode 100644 index 43fce117f331..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_delivery_info_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDeliveryInfo(Model): - """The delivery information associated with a export. - - All required parameters must be populated in order to send to Azure. - - :param destination: Required. Has destination for the export being - delivered. - :type destination: - ~azure.mgmt.costmanagement.models.ExportDeliveryDestination - """ - - _validation = { - 'destination': {'required': True}, - } - - _attribute_map = { - 'destination': {'key': 'destination', 'type': 'ExportDeliveryDestination'}, - } - - def __init__(self, *, destination, **kwargs) -> None: - super(ExportDeliveryInfo, self).__init__(**kwargs) - self.destination = destination diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution.py deleted file mode 100644 index 7843f0594630..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class ExportExecution(Resource): - """A export execution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param execution_type: The type of the export execution. Possible values - include: 'OnDemand', 'Scheduled' - :type execution_type: str or - ~azure.mgmt.costmanagement.models.ExecutionType - :param status: The status of the export execution. Possible values - include: 'Queued', 'InProgress', 'Completed', 'Failed', 'Timeout', - 'NewDataNotAvailable', 'DataNotAvailable' - :type status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus - :param submitted_by: The identifier for the entity that executed the - export. For OnDemand executions, it is the email id. For Scheduled - executions, it is the constant value - System. - :type submitted_by: str - :param submitted_time: The time when export was queued to be executed. - :type submitted_time: datetime - :param processing_start_time: The time when export was picked up to be - executed. - :type processing_start_time: datetime - :param processing_end_time: The time when export execution finished. - :type processing_end_time: datetime - :param file_name: The name of the file export got written to. - :type file_name: str - :param run_settings: - :type run_settings: - ~azure.mgmt.costmanagement.models.CommonExportProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'execution_type': {'key': 'properties.executionType', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'submitted_by': {'key': 'properties.submittedBy', 'type': 'str'}, - 'submitted_time': {'key': 'properties.submittedTime', 'type': 'iso-8601'}, - 'processing_start_time': {'key': 'properties.processingStartTime', 'type': 'iso-8601'}, - 'processing_end_time': {'key': 'properties.processingEndTime', 'type': 'iso-8601'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'run_settings': {'key': 'properties.runSettings', 'type': 'CommonExportProperties'}, - } - - def __init__(self, **kwargs): - super(ExportExecution, self).__init__(**kwargs) - self.execution_type = kwargs.get('execution_type', None) - self.status = kwargs.get('status', None) - self.submitted_by = kwargs.get('submitted_by', None) - self.submitted_time = kwargs.get('submitted_time', None) - self.processing_start_time = kwargs.get('processing_start_time', None) - self.processing_end_time = kwargs.get('processing_end_time', None) - self.file_name = kwargs.get('file_name', None) - self.run_settings = kwargs.get('run_settings', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_list_result.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_list_result.py deleted file mode 100644 index d3a017601d17..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_list_result.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportExecutionListResult(Model): - """Result of listing exports execution history of a export by name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of export executions. - :vartype value: list[~azure.mgmt.costmanagement.models.ExportExecution] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExportExecution]'}, - } - - def __init__(self, **kwargs): - super(ExportExecutionListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_list_result_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_list_result_py3.py deleted file mode 100644 index ae37c54c2e60..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_list_result_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportExecutionListResult(Model): - """Result of listing exports execution history of a export by name. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of export executions. - :vartype value: list[~azure.mgmt.costmanagement.models.ExportExecution] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExportExecution]'}, - } - - def __init__(self, **kwargs) -> None: - super(ExportExecutionListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_py3.py deleted file mode 100644 index 00d8281329cc..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_execution_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class ExportExecution(Resource): - """A export execution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param execution_type: The type of the export execution. Possible values - include: 'OnDemand', 'Scheduled' - :type execution_type: str or - ~azure.mgmt.costmanagement.models.ExecutionType - :param status: The status of the export execution. Possible values - include: 'Queued', 'InProgress', 'Completed', 'Failed', 'Timeout', - 'NewDataNotAvailable', 'DataNotAvailable' - :type status: str or ~azure.mgmt.costmanagement.models.ExecutionStatus - :param submitted_by: The identifier for the entity that executed the - export. For OnDemand executions, it is the email id. For Scheduled - executions, it is the constant value - System. - :type submitted_by: str - :param submitted_time: The time when export was queued to be executed. - :type submitted_time: datetime - :param processing_start_time: The time when export was picked up to be - executed. - :type processing_start_time: datetime - :param processing_end_time: The time when export execution finished. - :type processing_end_time: datetime - :param file_name: The name of the file export got written to. - :type file_name: str - :param run_settings: - :type run_settings: - ~azure.mgmt.costmanagement.models.CommonExportProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'execution_type': {'key': 'properties.executionType', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'submitted_by': {'key': 'properties.submittedBy', 'type': 'str'}, - 'submitted_time': {'key': 'properties.submittedTime', 'type': 'iso-8601'}, - 'processing_start_time': {'key': 'properties.processingStartTime', 'type': 'iso-8601'}, - 'processing_end_time': {'key': 'properties.processingEndTime', 'type': 'iso-8601'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'run_settings': {'key': 'properties.runSettings', 'type': 'CommonExportProperties'}, - } - - def __init__(self, *, execution_type=None, status=None, submitted_by: str=None, submitted_time=None, processing_start_time=None, processing_end_time=None, file_name: str=None, run_settings=None, **kwargs) -> None: - super(ExportExecution, self).__init__(**kwargs) - self.execution_type = execution_type - self.status = status - self.submitted_by = submitted_by - self.submitted_time = submitted_time - self.processing_start_time = processing_start_time - self.processing_end_time = processing_end_time - self.file_name = file_name - self.run_settings = run_settings diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_list_result.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_list_result.py deleted file mode 100644 index 0a894f869f41..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_list_result.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportListResult(Model): - """Result of listing exports. It contains a list of available exports in the - scope provided. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of exports. - :vartype value: list[~azure.mgmt.costmanagement.models.Export] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Export]'}, - } - - def __init__(self, **kwargs): - super(ExportListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_list_result_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_list_result_py3.py deleted file mode 100644 index 562f78ca565e..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_list_result_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportListResult(Model): - """Result of listing exports. It contains a list of available exports in the - scope provided. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: The list of exports. - :vartype value: list[~azure.mgmt.costmanagement.models.Export] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Export]'}, - } - - def __init__(self, **kwargs) -> None: - super(ExportListResult, self).__init__(**kwargs) - self.value = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_py3.py deleted file mode 100644 index bf8cbd862cb0..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Export(Resource): - """A export resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param format: The format of the export being delivered. Possible values - include: 'Csv' - :type format: str or ~azure.mgmt.costmanagement.models.FormatType - :param delivery_info: Required. Has delivery information for the export. - :type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo - :param definition: Required. Has definition for the export. - :type definition: ~azure.mgmt.costmanagement.models.QueryDefinition - :param schedule: Has schedule information for the export. - :type schedule: ~azure.mgmt.costmanagement.models.ExportSchedule - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'delivery_info': {'required': True}, - 'definition': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'format': {'key': 'properties.format', 'type': 'str'}, - 'delivery_info': {'key': 'properties.deliveryInfo', 'type': 'ExportDeliveryInfo'}, - 'definition': {'key': 'properties.definition', 'type': 'QueryDefinition'}, - 'schedule': {'key': 'properties.schedule', 'type': 'ExportSchedule'}, - } - - def __init__(self, *, delivery_info, definition, format=None, schedule=None, **kwargs) -> None: - super(Export, self).__init__(**kwargs) - self.format = format - self.delivery_info = delivery_info - self.definition = definition - self.schedule = schedule diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_recurrence_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_recurrence_period.py deleted file mode 100644 index 928221e85bfa..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_recurrence_period.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRecurrencePeriod(Model): - """The start and end date for recurrence schedule. - - All required parameters must be populated in order to send to Azure. - - :param from_property: Required. The start date of recurrence. - :type from_property: datetime - :param to: The end date of recurrence. - :type to: datetime - """ - - _validation = { - 'from_property': {'required': True}, - } - - _attribute_map = { - 'from_property': {'key': 'from', 'type': 'iso-8601'}, - 'to': {'key': 'to', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(ExportRecurrencePeriod, self).__init__(**kwargs) - self.from_property = kwargs.get('from_property', None) - self.to = kwargs.get('to', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_recurrence_period_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_recurrence_period_py3.py deleted file mode 100644 index 98cc8316fb69..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_recurrence_period_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportRecurrencePeriod(Model): - """The start and end date for recurrence schedule. - - All required parameters must be populated in order to send to Azure. - - :param from_property: Required. The start date of recurrence. - :type from_property: datetime - :param to: The end date of recurrence. - :type to: datetime - """ - - _validation = { - 'from_property': {'required': True}, - } - - _attribute_map = { - 'from_property': {'key': 'from', 'type': 'iso-8601'}, - 'to': {'key': 'to', 'type': 'iso-8601'}, - } - - def __init__(self, *, from_property, to=None, **kwargs) -> None: - super(ExportRecurrencePeriod, self).__init__(**kwargs) - self.from_property = from_property - self.to = to diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_schedule.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_schedule.py deleted file mode 100644 index 29ed33f58aa3..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_schedule.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportSchedule(Model): - """The schedule associated with a export. - - All required parameters must be populated in order to send to Azure. - - :param status: The status of the schedule. Whether active or not. If - inactive, the export's scheduled execution is paused. Possible values - include: 'Active', 'Inactive' - :type status: str or ~azure.mgmt.costmanagement.models.StatusType - :param recurrence: Required. The schedule recurrence. Possible values - include: 'Daily', 'Weekly', 'Monthly', 'Annually' - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType - :param recurrence_period: Has start and end date of the recurrence. The - start date must be in future. If present, the end date must be greater - than start date. - :type recurrence_period: - ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod - """ - - _validation = { - 'recurrence': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'recurrence': {'key': 'recurrence', 'type': 'str'}, - 'recurrence_period': {'key': 'recurrencePeriod', 'type': 'ExportRecurrencePeriod'}, - } - - def __init__(self, **kwargs): - super(ExportSchedule, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.recurrence = kwargs.get('recurrence', None) - self.recurrence_period = kwargs.get('recurrence_period', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_schedule_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_schedule_py3.py deleted file mode 100644 index 76235e40c282..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/export_schedule_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportSchedule(Model): - """The schedule associated with a export. - - All required parameters must be populated in order to send to Azure. - - :param status: The status of the schedule. Whether active or not. If - inactive, the export's scheduled execution is paused. Possible values - include: 'Active', 'Inactive' - :type status: str or ~azure.mgmt.costmanagement.models.StatusType - :param recurrence: Required. The schedule recurrence. Possible values - include: 'Daily', 'Weekly', 'Monthly', 'Annually' - :type recurrence: str or ~azure.mgmt.costmanagement.models.RecurrenceType - :param recurrence_period: Has start and end date of the recurrence. The - start date must be in future. If present, the end date must be greater - than start date. - :type recurrence_period: - ~azure.mgmt.costmanagement.models.ExportRecurrencePeriod - """ - - _validation = { - 'recurrence': {'required': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'recurrence': {'key': 'recurrence', 'type': 'str'}, - 'recurrence_period': {'key': 'recurrencePeriod', 'type': 'ExportRecurrencePeriod'}, - } - - def __init__(self, *, recurrence, status=None, recurrence_period=None, **kwargs) -> None: - super(ExportSchedule, self).__init__(**kwargs) - self.status = status - self.recurrence = recurrence - self.recurrence_period = recurrence_period diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation.py deleted file mode 100644 index c5965e54743a..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Cost management REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.costmanagement.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_display.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_display.py deleted file mode 100644 index e85e6e2a6647..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_display.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.CostManagement. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Dimensions, - Query. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_display_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_display_py3.py deleted file mode 100644 index 63ff2a7e14df..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_display_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft.CostManagement. - :vartype provider: str - :ivar resource: Resource on which the operation is performed: Dimensions, - Query. - :vartype resource: str - :ivar operation: Operation type: Read, write, delete, etc. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_paged.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_paged.py deleted file mode 100644 index 2127f26e1525..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_py3.py deleted file mode 100644 index c69e983617b9..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/operation_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """A Cost management REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.costmanagement.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query.py deleted file mode 100644 index d2dd13ad3e7f..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class Query(Resource): - """Query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param next_link: - :type next_link: str - :param columns: Array of columns - :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] - :param rows: - :type rows: list[list[object]] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[QueryColumn]'}, - 'rows': {'key': 'properties.rows', 'type': '[[object]]'}, - } - - def __init__(self, **kwargs): - super(Query, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.columns = kwargs.get('columns', None) - self.rows = kwargs.get('rows', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_aggregation.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_aggregation.py deleted file mode 100644 index d6b23a1e6980..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_aggregation.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryAggregation(Model): - """The aggregation expression to be used in the query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the column to aggregate. - :type name: str - :ivar function: Required. The name of the aggregation function to use. - Default value: "Sum" . - :vartype function: str - """ - - _validation = { - 'name': {'required': True}, - 'function': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'function': {'key': 'function', 'type': 'str'}, - } - - function = "Sum" - - def __init__(self, **kwargs): - super(QueryAggregation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_aggregation_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_aggregation_py3.py deleted file mode 100644 index 653dd6683433..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_aggregation_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryAggregation(Model): - """The aggregation expression to be used in the query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the column to aggregate. - :type name: str - :ivar function: Required. The name of the aggregation function to use. - Default value: "Sum" . - :vartype function: str - """ - - _validation = { - 'name': {'required': True}, - 'function': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'function': {'key': 'function', 'type': 'str'}, - } - - function = "Sum" - - def __init__(self, *, name: str, **kwargs) -> None: - super(QueryAggregation, self).__init__(**kwargs) - self.name = name diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_column.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_column.py deleted file mode 100644 index 3aa1734245bf..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_column.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryColumn(Model): - """QueryColumn. - - :param name: - :type name: str - :param type: - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryColumn, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_column_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_column_py3.py deleted file mode 100644 index 903dd9b8c11d..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_column_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryColumn(Model): - """QueryColumn. - - :param name: - :type name: str - :param type: - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: - super(QueryColumn, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_comparison_expression.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_comparison_expression.py deleted file mode 100644 index c932b1a9a232..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_comparison_expression.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryComparisonExpression(Model): - """The comparison expression to be used in the query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the column to use in comparison. - :type name: str - :ivar operator: Required. The operator to use for comparison. Default - value: "In" . - :vartype operator: str - :param values: Required. Array of values to use for comparison - :type values: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'operator': {'required': True, 'constant': True}, - 'values': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - operator = "In" - - def __init__(self, **kwargs): - super(QueryComparisonExpression, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.values = kwargs.get('values', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_comparison_expression_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_comparison_expression_py3.py deleted file mode 100644 index d7f1f445571a..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_comparison_expression_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryComparisonExpression(Model): - """The comparison expression to be used in the query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the column to use in comparison. - :type name: str - :ivar operator: Required. The operator to use for comparison. Default - value: "In" . - :vartype operator: str - :param values: Required. Array of values to use for comparison - :type values: list[str] - """ - - _validation = { - 'name': {'required': True}, - 'operator': {'required': True, 'constant': True}, - 'values': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - operator = "In" - - def __init__(self, *, name: str, values, **kwargs) -> None: - super(QueryComparisonExpression, self).__init__(**kwargs) - self.name = name - self.values = values diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset.py deleted file mode 100644 index f34f504aa888..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryDataset(Model): - """The definition of data present in the query. - - :param granularity: The granularity of rows in the query. Possible values - include: 'Daily', 'Hourly' - :type granularity: str or - ~azure.mgmt.costmanagement.models.GranularityType - :param configuration: Has configuration information for the data in the - export. The configuration will be ignored if aggregation and grouping are - provided. - :type configuration: - ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration - :param aggregation: Dictionary of aggregation expression to use in the - query. The key of each item in the dictionary is the alias for the - aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, - ~azure.mgmt.costmanagement.models.QueryAggregation] - :param grouping: Array of group by expression to use in the query. Query - can have up to 2 group by clauses. - :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :param sorting: Array of sorting by columns in query. - :type sorting: - list[~azure.mgmt.costmanagement.models.QuerySortingConfiguration] - :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter - """ - - _validation = { - 'grouping': {'max_items': 2}, - } - - _attribute_map = { - 'granularity': {'key': 'granularity', 'type': 'str'}, - 'configuration': {'key': 'configuration', 'type': 'QueryDatasetConfiguration'}, - 'aggregation': {'key': 'aggregation', 'type': '{QueryAggregation}'}, - 'grouping': {'key': 'grouping', 'type': '[QueryGrouping]'}, - 'sorting': {'key': 'sorting', 'type': '[QuerySortingConfiguration]'}, - 'filter': {'key': 'filter', 'type': 'QueryFilter'}, - } - - def __init__(self, **kwargs): - super(QueryDataset, self).__init__(**kwargs) - self.granularity = kwargs.get('granularity', None) - self.configuration = kwargs.get('configuration', None) - self.aggregation = kwargs.get('aggregation', None) - self.grouping = kwargs.get('grouping', None) - self.sorting = kwargs.get('sorting', None) - self.filter = kwargs.get('filter', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_configuration.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_configuration.py deleted file mode 100644 index 2b77baab82cc..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_configuration.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryDatasetConfiguration(Model): - """The configuration of dataset in the query. - - :param columns: Array of column names to be included in the query. Any - valid query column name is allowed. If not provided, then query includes - all columns. - :type columns: list[str] - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(QueryDatasetConfiguration, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_configuration_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_configuration_py3.py deleted file mode 100644 index 4a660322a527..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_configuration_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryDatasetConfiguration(Model): - """The configuration of dataset in the query. - - :param columns: Array of column names to be included in the query. Any - valid query column name is allowed. If not provided, then query includes - all columns. - :type columns: list[str] - """ - - _attribute_map = { - 'columns': {'key': 'columns', 'type': '[str]'}, - } - - def __init__(self, *, columns=None, **kwargs) -> None: - super(QueryDatasetConfiguration, self).__init__(**kwargs) - self.columns = columns diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_py3.py deleted file mode 100644 index 016173c300c5..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_dataset_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryDataset(Model): - """The definition of data present in the query. - - :param granularity: The granularity of rows in the query. Possible values - include: 'Daily', 'Hourly' - :type granularity: str or - ~azure.mgmt.costmanagement.models.GranularityType - :param configuration: Has configuration information for the data in the - export. The configuration will be ignored if aggregation and grouping are - provided. - :type configuration: - ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration - :param aggregation: Dictionary of aggregation expression to use in the - query. The key of each item in the dictionary is the alias for the - aggregated column. Query can have up to 2 aggregation clauses. - :type aggregation: dict[str, - ~azure.mgmt.costmanagement.models.QueryAggregation] - :param grouping: Array of group by expression to use in the query. Query - can have up to 2 group by clauses. - :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] - :param sorting: Array of sorting by columns in query. - :type sorting: - list[~azure.mgmt.costmanagement.models.QuerySortingConfiguration] - :param filter: Has filter expression to use in the query. - :type filter: ~azure.mgmt.costmanagement.models.QueryFilter - """ - - _validation = { - 'grouping': {'max_items': 2}, - } - - _attribute_map = { - 'granularity': {'key': 'granularity', 'type': 'str'}, - 'configuration': {'key': 'configuration', 'type': 'QueryDatasetConfiguration'}, - 'aggregation': {'key': 'aggregation', 'type': '{QueryAggregation}'}, - 'grouping': {'key': 'grouping', 'type': '[QueryGrouping]'}, - 'sorting': {'key': 'sorting', 'type': '[QuerySortingConfiguration]'}, - 'filter': {'key': 'filter', 'type': 'QueryFilter'}, - } - - def __init__(self, *, granularity=None, configuration=None, aggregation=None, grouping=None, sorting=None, filter=None, **kwargs) -> None: - super(QueryDataset, self).__init__(**kwargs) - self.granularity = granularity - self.configuration = configuration - self.aggregation = aggregation - self.grouping = grouping - self.sorting = sorting - self.filter = filter diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_definition.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_definition.py deleted file mode 100644 index 2893fb7ba3fc..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_definition.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryDefinition(Model): - """The definition of a query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of the query. Default value: "Usage" . - :vartype type: str - :param timeframe: Required. The time frame for pulling data for the query. - If custom, then a specific time period must be provided. Possible values - include: 'WeekToDate', 'MonthToDate', 'YearToDate', 'TheLastWeek', - 'TheLastMonth', 'TheLastYear', 'Custom' - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType - :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :param dataset: Has definition for data in this query. - :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'timeframe': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'timeframe': {'key': 'timeframe', 'type': 'str'}, - 'time_period': {'key': 'timePeriod', 'type': 'QueryTimePeriod'}, - 'dataset': {'key': 'dataset', 'type': 'QueryDataset'}, - } - - type = "Usage" - - def __init__(self, **kwargs): - super(QueryDefinition, self).__init__(**kwargs) - self.timeframe = kwargs.get('timeframe', None) - self.time_period = kwargs.get('time_period', None) - self.dataset = kwargs.get('dataset', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_definition_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_definition_py3.py deleted file mode 100644 index bf088e52b50a..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_definition_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryDefinition(Model): - """The definition of a query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The type of the query. Default value: "Usage" . - :vartype type: str - :param timeframe: Required. The time frame for pulling data for the query. - If custom, then a specific time period must be provided. Possible values - include: 'WeekToDate', 'MonthToDate', 'YearToDate', 'TheLastWeek', - 'TheLastMonth', 'TheLastYear', 'Custom' - :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType - :param time_period: Has time period for pulling data for the query. - :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod - :param dataset: Has definition for data in this query. - :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset - """ - - _validation = { - 'type': {'required': True, 'constant': True}, - 'timeframe': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'timeframe': {'key': 'timeframe', 'type': 'str'}, - 'time_period': {'key': 'timePeriod', 'type': 'QueryTimePeriod'}, - 'dataset': {'key': 'dataset', 'type': 'QueryDataset'}, - } - - type = "Usage" - - def __init__(self, *, timeframe, time_period=None, dataset=None, **kwargs) -> None: - super(QueryDefinition, self).__init__(**kwargs) - self.timeframe = timeframe - self.time_period = time_period - self.dataset = dataset diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_filter.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_filter.py deleted file mode 100644 index 0242d37de76d..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_filter.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryFilter(Model): - """The filter expression to be used in the export. - - :param and_property: The logical "AND" expression. Must have at least 2 - items. - :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :param or_property: The logical "OR" expression. Must have at least 2 - items. - :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :param not_property: The logical "NOT" expression. - :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter - :param dimension: Has comparison expression for a dimension - :type dimension: - ~azure.mgmt.costmanagement.models.QueryComparisonExpression - :param tag: Has comparison expression for a tag - :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression - """ - - _validation = { - 'and_property': {'min_items': 2}, - 'or_property': {'min_items': 2}, - } - - _attribute_map = { - 'and_property': {'key': 'and', 'type': '[QueryFilter]'}, - 'or_property': {'key': 'or', 'type': '[QueryFilter]'}, - 'not_property': {'key': 'not', 'type': 'QueryFilter'}, - 'dimension': {'key': 'dimension', 'type': 'QueryComparisonExpression'}, - 'tag': {'key': 'tag', 'type': 'QueryComparisonExpression'}, - } - - def __init__(self, **kwargs): - super(QueryFilter, self).__init__(**kwargs) - self.and_property = kwargs.get('and_property', None) - self.or_property = kwargs.get('or_property', None) - self.not_property = kwargs.get('not_property', None) - self.dimension = kwargs.get('dimension', None) - self.tag = kwargs.get('tag', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_filter_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_filter_py3.py deleted file mode 100644 index f6e4f0ee5976..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_filter_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryFilter(Model): - """The filter expression to be used in the export. - - :param and_property: The logical "AND" expression. Must have at least 2 - items. - :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :param or_property: The logical "OR" expression. Must have at least 2 - items. - :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] - :param not_property: The logical "NOT" expression. - :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter - :param dimension: Has comparison expression for a dimension - :type dimension: - ~azure.mgmt.costmanagement.models.QueryComparisonExpression - :param tag: Has comparison expression for a tag - :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression - """ - - _validation = { - 'and_property': {'min_items': 2}, - 'or_property': {'min_items': 2}, - } - - _attribute_map = { - 'and_property': {'key': 'and', 'type': '[QueryFilter]'}, - 'or_property': {'key': 'or', 'type': '[QueryFilter]'}, - 'not_property': {'key': 'not', 'type': 'QueryFilter'}, - 'dimension': {'key': 'dimension', 'type': 'QueryComparisonExpression'}, - 'tag': {'key': 'tag', 'type': 'QueryComparisonExpression'}, - } - - def __init__(self, *, and_property=None, or_property=None, not_property=None, dimension=None, tag=None, **kwargs) -> None: - super(QueryFilter, self).__init__(**kwargs) - self.and_property = and_property - self.or_property = or_property - self.not_property = not_property - self.dimension = dimension - self.tag = tag diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_grouping.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_grouping.py deleted file mode 100644 index ee61a9990685..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_grouping.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryGrouping(Model): - """The group by expression to be used in the query. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Has type of the column to group. Possible values - include: 'Tag', 'Dimension' - :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType - :param name: Required. The name of the column to group. - :type name: str - """ - - _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryGrouping, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.name = kwargs.get('name', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_grouping_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_grouping_py3.py deleted file mode 100644 index 65f4b79f255f..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_grouping_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryGrouping(Model): - """The group by expression to be used in the query. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Has type of the column to group. Possible values - include: 'Tag', 'Dimension' - :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType - :param name: Required. The name of the column to group. - :type name: str - """ - - _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, type, name: str, **kwargs) -> None: - super(QueryGrouping, self).__init__(**kwargs) - self.type = type - self.name = name diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_paged.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_paged.py deleted file mode 100644 index fe30582676d5..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class QueryPaged(Paged): - """ - A paging container for iterating over a list of :class:`Query ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Query]'} - } - - def __init__(self, *args, **kwargs): - - super(QueryPaged, self).__init__(*args, **kwargs) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_py3.py deleted file mode 100644 index d0d08fb08457..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class Query(Resource): - """Query. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :param next_link: - :type next_link: str - :param columns: Array of columns - :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] - :param rows: - :type rows: list[list[object]] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, - 'columns': {'key': 'properties.columns', 'type': '[QueryColumn]'}, - 'rows': {'key': 'properties.rows', 'type': '[[object]]'}, - } - - def __init__(self, *, next_link: str=None, columns=None, rows=None, **kwargs) -> None: - super(Query, self).__init__(**kwargs) - self.next_link = next_link - self.columns = columns - self.rows = rows diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_sorting_configuration.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_sorting_configuration.py deleted file mode 100644 index ea1704928e03..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_sorting_configuration.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuerySortingConfiguration(Model): - """The configuration for sorting in the query. - - :param query_sorting_direction: The sorting direction. Possible values - include: 'Ascending', 'Descending' - :type query_sorting_direction: str or - ~azure.mgmt.costmanagement.models.SortDirection - :param name: The name of the column to use in sorting. - :type name: str - """ - - _attribute_map = { - 'query_sorting_direction': {'key': 'querySortingDirection', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QuerySortingConfiguration, self).__init__(**kwargs) - self.query_sorting_direction = kwargs.get('query_sorting_direction', None) - self.name = kwargs.get('name', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_sorting_configuration_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_sorting_configuration_py3.py deleted file mode 100644 index fc7524c322d3..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_sorting_configuration_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QuerySortingConfiguration(Model): - """The configuration for sorting in the query. - - :param query_sorting_direction: The sorting direction. Possible values - include: 'Ascending', 'Descending' - :type query_sorting_direction: str or - ~azure.mgmt.costmanagement.models.SortDirection - :param name: The name of the column to use in sorting. - :type name: str - """ - - _attribute_map = { - 'query_sorting_direction': {'key': 'querySortingDirection', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, query_sorting_direction=None, name: str=None, **kwargs) -> None: - super(QuerySortingConfiguration, self).__init__(**kwargs) - self.query_sorting_direction = query_sorting_direction - self.name = name diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_time_period.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_time_period.py deleted file mode 100644 index 3c0dc37b8619..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_time_period.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryTimePeriod(Model): - """The start and end date for pulling data for the query. - - All required parameters must be populated in order to send to Azure. - - :param from_property: Required. The start date to pull data from. - :type from_property: datetime - :param to: Required. The end date to pull data to. - :type to: datetime - """ - - _validation = { - 'from_property': {'required': True}, - 'to': {'required': True}, - } - - _attribute_map = { - 'from_property': {'key': 'from', 'type': 'iso-8601'}, - 'to': {'key': 'to', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(QueryTimePeriod, self).__init__(**kwargs) - self.from_property = kwargs.get('from_property', None) - self.to = kwargs.get('to', None) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_time_period_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_time_period_py3.py deleted file mode 100644 index 63a1d7d6e08c..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/query_time_period_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryTimePeriod(Model): - """The start and end date for pulling data for the query. - - All required parameters must be populated in order to send to Azure. - - :param from_property: Required. The start date to pull data from. - :type from_property: datetime - :param to: Required. The end date to pull data to. - :type to: datetime - """ - - _validation = { - 'from_property': {'required': True}, - 'to': {'required': True}, - } - - _attribute_map = { - 'from_property': {'key': 'from', 'type': 'iso-8601'}, - 'to': {'key': 'to', 'type': 'iso-8601'}, - } - - def __init__(self, *, from_property, to, **kwargs) -> None: - super(QueryTimePeriod, self).__init__(**kwargs) - self.from_property = from_property - self.to = to diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/resource.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/resource.py deleted file mode 100644 index 08e36f3f8091..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/resource.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/resource_py3.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/resource_py3.py deleted file mode 100644 index 38b4ca3ee6af..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/resource_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py index fbf3fa761115..ed3adf92c621 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/__init__.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .dimensions_operations import DimensionsOperations -from .query_operations import QueryOperations -from .exports_operations import ExportsOperations -from .operations import Operations +from ._dimensions_operations import DimensionsOperations +from ._query_operations import QueryOperations +from ._exports_operations import ExportsOperations +from ._operations import Operations __all__ = [ 'DimensionsOperations', diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/dimensions_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py similarity index 84% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/dimensions_operations.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py index 5bdad8c6f173..abcc31a42de6 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/dimensions_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_dimensions_operations.py @@ -18,11 +18,13 @@ class DimensionsOperations(object): """DimensionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2018-05-31. Constant value: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-05-31. Constant value: "2019-10-01". """ models = models @@ -32,11 +34,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-01-01" + self.api_version = "2019-10-01" self.config = config - def list_by_subscription( + def list( self, scope, filter=None, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): """Lists the dimensions by the defined scope. @@ -49,9 +51,15 @@ def list_by_subscription( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and + for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope.. + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param filter: May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. @@ -80,11 +88,10 @@ def list_by_subscription( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) } @@ -118,6 +125,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -126,12 +138,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DimensionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.DimensionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.DimensionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_subscription.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/dimensions'} + list.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/dimensions'} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/exports_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py similarity index 79% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/exports_operations.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py index f08534765780..4dd3ec39c322 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/exports_operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_exports_operations.py @@ -18,11 +18,13 @@ class ExportsOperations(object): """ExportsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2018-05-31. Constant value: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-05-31. Constant value: "2019-10-01". """ models = models @@ -32,16 +34,17 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-01-01" + self.api_version = "2019-10-01" self.config = config def list( self, scope, custom_headers=None, raw=False, **operation_config): - """Lists all exports at the given scope. + """The operation to list all exports at the given scope. - :param scope: The scope associated with export operations. This - includes '/subscriptions/{subscriptionId}' for subscription scope, + :param scope: The scope associated with query and export operations. + This includes '/subscriptions/{subscriptionId}/' for subscription + scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for @@ -49,7 +52,15 @@ def list( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -91,7 +102,6 @@ def list( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExportListResult', response) @@ -104,10 +114,11 @@ def list( def get( self, scope, export_name, custom_headers=None, raw=False, **operation_config): - """Gets the export for the defined scope by export name. + """The operation to get the export for the defined scope by export name. - :param scope: The scope associated with export operations. This - includes '/subscriptions/{subscriptionId}' for subscription scope, + :param scope: The scope associated with query and export operations. + This includes '/subscriptions/{subscriptionId}/' for subscription + scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for @@ -115,7 +126,15 @@ def get( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param export_name: Export Name. :type export_name: str @@ -160,7 +179,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Export', response) @@ -177,8 +195,9 @@ def create_or_update( latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. - :param scope: The scope associated with export operations. This - includes '/subscriptions/{subscriptionId}' for subscription scope, + :param scope: The scope associated with query and export operations. + This includes '/subscriptions/{subscriptionId}/' for subscription + scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for @@ -186,7 +205,15 @@ def create_or_update( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param export_name: Export Name. :type export_name: str @@ -238,7 +265,6 @@ def create_or_update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Export', response) if response.status_code == 201: @@ -255,8 +281,9 @@ def delete( self, scope, export_name, custom_headers=None, raw=False, **operation_config): """The operation to delete a export. - :param scope: The scope associated with export operations. This - includes '/subscriptions/{subscriptionId}' for subscription scope, + :param scope: The scope associated with query and export operations. + This includes '/subscriptions/{subscriptionId}/' for subscription + scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for @@ -264,7 +291,15 @@ def delete( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param export_name: Export Name. :type export_name: str @@ -315,8 +350,9 @@ def execute( self, scope, export_name, custom_headers=None, raw=False, **operation_config): """The operation to execute a export. - :param scope: The scope associated with export operations. This - includes '/subscriptions/{subscriptionId}' for subscription scope, + :param scope: The scope associated with query and export operations. + This includes '/subscriptions/{subscriptionId}/' for subscription + scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for @@ -324,7 +360,15 @@ def execute( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param export_name: Export Name. :type export_name: str @@ -373,11 +417,12 @@ def execute( def get_execution_history( self, scope, export_name, custom_headers=None, raw=False, **operation_config): - """Gets the execution history of a export for the defined scope by export - name. + """The operation to get the execution history of an export for the defined + scope by export name. - :param scope: The scope associated with export operations. This - includes '/subscriptions/{subscriptionId}' for subscription scope, + :param scope: The scope associated with query and export operations. + This includes '/subscriptions/{subscriptionId}/' for subscription + scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for @@ -385,7 +430,15 @@ def get_execution_history( '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. :type scope: str :param export_name: Export Name. :type export_name: str @@ -430,7 +483,6 @@ def get_execution_history( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ExportExecutionListResult', response) diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py similarity index 89% rename from sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/operations.py rename to sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py index ab1bdbe26fc0..c834fdb3b211 100644 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/operations.py +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_operations.py @@ -18,11 +18,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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. The current version is 2018-05-31. Constant value: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-05-31. Constant value: "2019-10-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-01-01" + self.api_version = "2019-10-01" self.config = config @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.CostManagement/operations'} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py new file mode 100644 index 000000000000..950650c19e87 --- /dev/null +++ b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/_query_operations.py @@ -0,0 +1,120 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class QueryOperations(object): + """QueryOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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. The current version is 2018-05-31. Constant value: "2019-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-10-01" + + self.config = config + + def usage( + self, scope, parameters, custom_headers=None, raw=False, **operation_config): + """Query the usage data for scope defined. + + :param scope: The scope associated with query and export operations. + This includes '/subscriptions/{subscriptionId}/' for subscription + scope, + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' + for resourceGroup scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for + Billing Account scope and + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' + for Department scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + for EnrollmentAccount scope, + '/providers/Microsoft.Management/managementGroups/{managementGroupId} + for Management Group scope, + '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + for billingProfile scope, + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + for invoiceSection scope, and + 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' + specific for partners. + :type scope: str + :param parameters: Parameters supplied to the CreateOrUpdate Query + Config operation. + :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: QueryResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.costmanagement.models.QueryResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.usage.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'QueryDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('QueryResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + usage.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/query'} diff --git a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/query_operations.py b/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/query_operations.py deleted file mode 100644 index c855c0cdd6f4..000000000000 --- a/sdk/costmanagement/azure-mgmt-costmanagement/azure/mgmt/costmanagement/operations/query_operations.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class QueryOperations(object): - """QueryOperations operations. - - :param client: Client for service requests. - :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. The current version is 2018-05-31. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def usage_by_scope( - self, scope, parameters, custom_headers=None, raw=False, **operation_config): - """Query the usage data for scope defined. - - :param scope: The scope associated with query operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId} - for Management Group scope.. - :type scope: str - :param parameters: Parameters supplied to the CreateOrUpdate Query - Config operation. - :type parameters: ~azure.mgmt.costmanagement.models.QueryDefinition - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Query - :rtype: - ~azure.mgmt.costmanagement.models.QueryPaged[~azure.mgmt.costmanagement.models.Query] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.usage_by_scope.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'QueryDefinition') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.QueryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.QueryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - usage_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.CostManagement/query'} diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py index 19a375c22f11..70b9adaed9bb 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py @@ -74,7 +74,7 @@ def __init__( super(DataShareManagementClient, 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 = '2018-11-01-preview' + self.api_version = '2019-11-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py index b48f8c52adac..3886fa1dba1b 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py @@ -36,6 +36,10 @@ from ._models_py3 import DimensionProperties from ._models_py3 import Identity from ._models_py3 import Invitation + from ._models_py3 import KustoClusterDataSet + from ._models_py3 import KustoClusterDataSetMapping + from ._models_py3 import KustoDatabaseDataSet + from ._models_py3 import KustoDatabaseDataSetMapping from ._models_py3 import OperationMetaLogSpecification from ._models_py3 import OperationMetaMetricSpecification from ._models_py3 import OperationMetaServiceSpecification @@ -87,6 +91,10 @@ from ._models import DimensionProperties from ._models import Identity from ._models import Invitation + from ._models import KustoClusterDataSet + from ._models import KustoClusterDataSetMapping + from ._models import KustoDatabaseDataSet + from ._models import KustoDatabaseDataSetMapping from ._models import OperationMetaLogSpecification from ._models import OperationMetaMetricSpecification from ._models import OperationMetaServiceSpecification @@ -133,9 +141,9 @@ Status, InvitationStatus, ShareKind, + SynchronizationMode, DataSetType, ShareSubscriptionStatus, - SynchronizationMode, RecurrenceInterval, TriggerStatus, DataSetMappingStatus, @@ -169,6 +177,10 @@ 'DimensionProperties', 'Identity', 'Invitation', + 'KustoClusterDataSet', + 'KustoClusterDataSetMapping', + 'KustoDatabaseDataSet', + 'KustoDatabaseDataSetMapping', 'OperationMetaLogSpecification', 'OperationMetaMetricSpecification', 'OperationMetaServiceSpecification', @@ -203,9 +215,9 @@ 'ShareSynchronizationPaged', 'SynchronizationDetailsPaged', 'ProviderShareSubscriptionPaged', + 'ShareSubscriptionPaged', 'SourceShareSynchronizationSettingPaged', 'ShareSubscriptionSynchronizationPaged', - 'ShareSubscriptionPaged', 'ConsumerSourceDataSetPaged', 'SynchronizationSettingPaged', 'TriggerPaged', @@ -214,9 +226,9 @@ 'Status', 'InvitationStatus', 'ShareKind', + 'SynchronizationMode', 'DataSetType', 'ShareSubscriptionStatus', - 'SynchronizationMode', 'RecurrenceInterval', 'TriggerStatus', 'DataSetMappingStatus', diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py index e826669fcf9f..84d018a2e46b 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py @@ -47,6 +47,13 @@ class InvitationStatus(str, Enum): class ShareKind(str, Enum): copy_based = "CopyBased" + in_place = "InPlace" + + +class SynchronizationMode(str, Enum): + + incremental = "Incremental" + full_sync = "FullSync" class DataSetType(str, Enum): @@ -59,6 +66,8 @@ class DataSetType(str, Enum): adls_gen2_file = "AdlsGen2File" adls_gen1_folder = "AdlsGen1Folder" adls_gen1_file = "AdlsGen1File" + kusto_cluster = "KustoCluster" + kusto_database = "KustoDatabase" sql_db_table = "SqlDBTable" sql_dw_table = "SqlDWTable" @@ -71,12 +80,6 @@ class ShareSubscriptionStatus(str, Enum): revoking = "Revoking" -class SynchronizationMode(str, Enum): - - incremental = "Incremental" - full_sync = "FullSync" - - class RecurrenceInterval(str, Enum): hour = "Hour" diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py index 0a6a6c191321..6e4381f0a885 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py @@ -76,12 +76,14 @@ class Account(DefaultDto): :type identity: ~azure.mgmt.datashare.models.Identity :ivar created_at: Time at which the account was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the account. - :vartype created_by: str :ivar provisioning_state: Provisioning state of the Account. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.datashare.models.ProvisioningState + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -90,8 +92,9 @@ class Account(DefaultDto): 'type': {'readonly': True}, 'identity': {'required': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -102,16 +105,18 @@ class Account(DefaultDto): 'type': {'key': 'type', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, **kwargs): super(Account, self).__init__(**kwargs) self.identity = kwargs.get('identity', None) self.created_at = None - self.created_by = None self.provisioning_state = None + self.user_email = None + self.user_name = None class AccountUpdateParameters(Model): @@ -169,8 +174,8 @@ class DataSet(ProxyDto): You probably want to use the sub-classes and not this class directly. Known sub-classes are: BlobDataSet, BlobFolderDataSet, BlobContainerDataSet, ADLSGen2FileDataSet, ADLSGen2FolderDataSet, ADLSGen2FileSystemDataSet, - ADLSGen1FolderDataSet, ADLSGen1FileDataSet, SqlDWTableDataSet, - SqlDBTableDataSet + ADLSGen1FolderDataSet, ADLSGen1FileDataSet, KustoClusterDataSet, + KustoDatabaseDataSet, SqlDWTableDataSet, SqlDBTableDataSet Variables are only populated by the server, and will be ignored when sending a request. @@ -202,7 +207,7 @@ class DataSet(ProxyDto): } _subtype_map = { - 'kind': {'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen1File': 'ADLSGen1FileDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SqlDBTable': 'SqlDBTableDataSet'} + 'kind': {'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen1File': 'ADLSGen1FileDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SqlDBTable': 'SqlDBTableDataSet'} } def __init__(self, **kwargs): @@ -212,7 +217,7 @@ def __init__(self, **kwargs): class ADLSGen1FileDataSet(DataSet): - """An ADLS Gen 1 file dataset. + """An ADLS Gen 1 file data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -279,7 +284,7 @@ def __init__(self, **kwargs): class ADLSGen1FolderDataSet(DataSet): - """An ADLS Gen 1 folder dataset. + """An ADLS Gen 1 folder data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -341,7 +346,7 @@ def __init__(self, **kwargs): class ADLSGen2FileDataSet(DataSet): - """An ADLS Gen 2 file dataset. + """An ADLS Gen 2 file data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -409,12 +414,13 @@ def __init__(self, **kwargs): class DataSetMapping(ProxyDto): - """A dataset mapping data transfer object. + """A data set mapping data transfer object. You probably want to use the sub-classes and not this class directly. Known sub-classes are: BlobDataSetMapping, BlobFolderDataSetMapping, BlobContainerDataSetMapping, ADLSGen2FileDataSetMapping, ADLSGen2FolderDataSetMapping, ADLSGen2FileSystemDataSetMapping, + KustoClusterDataSetMapping, KustoDatabaseDataSetMapping, SqlDWTableDataSetMapping, SqlDBTableDataSetMapping Variables are only populated by the server, and will be ignored when @@ -447,7 +453,7 @@ class DataSetMapping(ProxyDto): } _subtype_map = { - 'kind': {'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping'} + 'kind': {'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping'} } def __init__(self, **kwargs): @@ -457,7 +463,7 @@ def __init__(self, **kwargs): class ADLSGen2FileDataSetMapping(DataSetMapping): - """An ADLS Gen2 file dataset mapping. + """An ADLS Gen2 file data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -472,11 +478,11 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_path: Required. File path within the file system. :type file_path: str @@ -485,6 +491,11 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): :param output_type: Type of output file. Possible values include: 'Csv', 'Parquet' :type output_type: str or ~azure.mgmt.datashare.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -499,8 +510,11 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_path': {'required': True}, 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -516,6 +530,7 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): 'file_path': {'key': 'properties.filePath', 'type': 'str'}, 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -524,10 +539,11 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): def __init__(self, **kwargs): super(ADLSGen2FileDataSetMapping, self).__init__(**kwargs) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None self.file_path = kwargs.get('file_path', None) self.file_system = kwargs.get('file_system', None) self.output_type = kwargs.get('output_type', None) + self.provisioning_state = None self.resource_group = kwargs.get('resource_group', None) self.storage_account_name = kwargs.get('storage_account_name', None) self.subscription_id = kwargs.get('subscription_id', None) @@ -535,7 +551,7 @@ def __init__(self, **kwargs): class ADLSGen2FileSystemDataSet(DataSet): - """An ADLS Gen 2 file system dataset. + """An ADLS Gen 2 file system data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -598,7 +614,7 @@ def __init__(self, **kwargs): class ADLSGen2FileSystemDataSetMapping(DataSetMapping): - """An ADLS Gen2 file system dataset mapping. + """An ADLS Gen2 file system data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -613,14 +629,19 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_system: Required. The file system name. :type file_system: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -635,7 +656,10 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -649,6 +673,7 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -657,8 +682,9 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): def __init__(self, **kwargs): super(ADLSGen2FileSystemDataSetMapping, self).__init__(**kwargs) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None self.file_system = kwargs.get('file_system', None) + self.provisioning_state = None self.resource_group = kwargs.get('resource_group', None) self.storage_account_name = kwargs.get('storage_account_name', None) self.subscription_id = kwargs.get('subscription_id', None) @@ -666,7 +692,7 @@ def __init__(self, **kwargs): class ADLSGen2FolderDataSet(DataSet): - """An ADLS Gen 2 folder dataset. + """An ADLS Gen 2 folder data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -734,7 +760,7 @@ def __init__(self, **kwargs): class ADLSGen2FolderDataSetMapping(DataSetMapping): - """An ADLS Gen2 folder dataset mapping. + """An ADLS Gen2 folder data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -749,16 +775,21 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_system: Required. File system to which the folder belongs. :type file_system: str :param folder_path: Required. Folder path within the file system. :type folder_path: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -773,8 +804,11 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_system': {'required': True}, 'folder_path': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -789,6 +823,7 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -797,9 +832,10 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): def __init__(self, **kwargs): super(ADLSGen2FolderDataSetMapping, self).__init__(**kwargs) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None self.file_system = kwargs.get('file_system', None) self.folder_path = kwargs.get('folder_path', None) + self.provisioning_state = None self.resource_group = kwargs.get('resource_group', None) self.storage_account_name = kwargs.get('storage_account_name', None) self.subscription_id = kwargs.get('subscription_id', None) @@ -807,7 +843,7 @@ def __init__(self, **kwargs): class BlobContainerDataSet(DataSet): - """An Azure storage blob container dataset. + """An Azure storage blob container data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -870,7 +906,7 @@ def __init__(self, **kwargs): class BlobContainerDataSetMapping(DataSetMapping): - """A Blob container dataset mapping. + """A Blob container data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -887,12 +923,17 @@ class BlobContainerDataSetMapping(DataSetMapping): :type kind: str :param container_name: Required. BLOB Container name. :type container_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -908,6 +949,9 @@ class BlobContainerDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -921,6 +965,7 @@ class BlobContainerDataSetMapping(DataSetMapping): 'container_name': {'key': 'properties.containerName', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -930,7 +975,8 @@ def __init__(self, **kwargs): super(BlobContainerDataSetMapping, self).__init__(**kwargs) self.container_name = kwargs.get('container_name', None) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None + self.provisioning_state = None self.resource_group = kwargs.get('resource_group', None) self.storage_account_name = kwargs.get('storage_account_name', None) self.subscription_id = kwargs.get('subscription_id', None) @@ -938,7 +984,7 @@ def __init__(self, **kwargs): class BlobDataSet(DataSet): - """An Azure storage blob dataset. + """An Azure storage blob data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -1006,7 +1052,7 @@ def __init__(self, **kwargs): class BlobDataSetMapping(DataSetMapping): - """A Blob dataset mapping. + """A Blob data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -1023,17 +1069,22 @@ class BlobDataSetMapping(DataSetMapping): :type kind: str :param container_name: Required. Container that has the file path. :type container_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_path: Required. File path within the source data set :type file_path: str :param output_type: File output type. Possible values include: 'Csv', 'Parquet' :type output_type: str or ~azure.mgmt.datashare.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -1049,7 +1100,10 @@ class BlobDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_path': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -1065,6 +1119,7 @@ class BlobDataSetMapping(DataSetMapping): 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'file_path': {'key': 'properties.filePath', 'type': 'str'}, 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -1074,9 +1129,10 @@ def __init__(self, **kwargs): super(BlobDataSetMapping, self).__init__(**kwargs) self.container_name = kwargs.get('container_name', None) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None self.file_path = kwargs.get('file_path', None) self.output_type = kwargs.get('output_type', None) + self.provisioning_state = None self.resource_group = kwargs.get('resource_group', None) self.storage_account_name = kwargs.get('storage_account_name', None) self.subscription_id = kwargs.get('subscription_id', None) @@ -1084,7 +1140,7 @@ def __init__(self, **kwargs): class BlobFolderDataSet(DataSet): - """An Azure storage blob folder dataset. + """An Azure storage blob folder data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -1152,7 +1208,7 @@ def __init__(self, **kwargs): class BlobFolderDataSetMapping(DataSetMapping): - """A Blob folder dataset mapping. + """A Blob folder data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -1169,14 +1225,19 @@ class BlobFolderDataSetMapping(DataSetMapping): :type kind: str :param container_name: Required. Container that has the file path. :type container_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param prefix: Required. Prefix for blob folder :type prefix: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -1192,7 +1253,10 @@ class BlobFolderDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'prefix': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -1207,6 +1271,7 @@ class BlobFolderDataSetMapping(DataSetMapping): 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, @@ -1216,8 +1281,9 @@ def __init__(self, **kwargs): super(BlobFolderDataSetMapping, self).__init__(**kwargs) self.container_name = kwargs.get('container_name', None) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None self.prefix = kwargs.get('prefix', None) + self.provisioning_state = None self.resource_group = kwargs.get('resource_group', None) self.storage_account_name = kwargs.get('storage_account_name', None) self.subscription_id = kwargs.get('subscription_id', None) @@ -1258,18 +1324,25 @@ class ConsumerInvitation(ProxyDto): ~azure.mgmt.datashare.models.InvitationStatus :ivar location: invitation location :vartype location: str + :ivar provider_email: Email of the provider who created the resource + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the + resource + :vartype provider_tenant_name: str :ivar responded_at: The time the recipient responded to the invitation. :vartype responded_at: datetime - :ivar sender: Gets the name of the sender. - :vartype sender: str - :ivar sender_company_name: Gets the company name of the sender. - :vartype sender_company_name: str :ivar sent_at: Gets the time at which the invitation was sent. :vartype sent_at: datetime :ivar share_name: Gets the source share Name. :vartype share_name: str :ivar terms_of_use: Terms of use shared when the invitation was created :vartype terms_of_use: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -1281,12 +1354,15 @@ class ConsumerInvitation(ProxyDto): 'invitation_id': {'required': True}, 'invitation_status': {'readonly': True}, 'location': {'readonly': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, 'responded_at': {'readonly': True}, - 'sender': {'readonly': True}, - 'sender_company_name': {'readonly': True}, 'sent_at': {'readonly': True}, 'share_name': {'readonly': True}, 'terms_of_use': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -1298,12 +1374,15 @@ class ConsumerInvitation(ProxyDto): 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'location': {'key': 'properties.location', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, - 'sender': {'key': 'properties.sender', 'type': 'str'}, - 'sender_company_name': {'key': 'properties.senderCompanyName', 'type': 'str'}, 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, 'share_name': {'key': 'properties.shareName', 'type': 'str'}, 'terms_of_use': {'key': 'properties.termsOfUse', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1313,12 +1392,15 @@ def __init__(self, **kwargs): self.invitation_id = kwargs.get('invitation_id', None) self.invitation_status = None self.location = None + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None self.responded_at = None - self.sender = None - self.sender_company_name = None self.sent_at = None self.share_name = None self.terms_of_use = None + self.user_email = None + self.user_name = None class ConsumerSourceDataSet(ProxyDto): @@ -1335,12 +1417,16 @@ class ConsumerSourceDataSet(ProxyDto): :vartype type: str :ivar data_set_id: DataSet Id :vartype data_set_id: str + :ivar data_set_location: Location of the data set. + :vartype data_set_location: str :ivar data_set_name: DataSet name :vartype data_set_name: str - :ivar data_set_type: Type of dataSet. Possible values include: 'Blob', + :ivar data_set_path: DataSet path + :vartype data_set_path: str + :ivar data_set_type: Type of data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', - 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'SqlDBTable', - 'SqlDWTable' + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType """ @@ -1349,7 +1435,9 @@ class ConsumerSourceDataSet(ProxyDto): 'name': {'readonly': True}, 'type': {'readonly': True}, 'data_set_id': {'readonly': True}, + 'data_set_location': {'readonly': True}, 'data_set_name': {'readonly': True}, + 'data_set_path': {'readonly': True}, 'data_set_type': {'readonly': True}, } @@ -1358,14 +1446,18 @@ class ConsumerSourceDataSet(ProxyDto): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_location': {'key': 'properties.dataSetLocation', 'type': 'str'}, 'data_set_name': {'key': 'properties.dataSetName', 'type': 'str'}, + 'data_set_path': {'key': 'properties.dataSetPath', 'type': 'str'}, 'data_set_type': {'key': 'properties.dataSetType', 'type': 'str'}, } def __init__(self, **kwargs): super(ConsumerSourceDataSet, self).__init__(**kwargs) self.data_set_id = None + self.data_set_location = None self.data_set_name = None + self.data_set_path = None self.data_set_type = None @@ -1510,8 +1602,6 @@ class Invitation(ProxyDto): ~azure.mgmt.datashare.models.InvitationStatus :ivar responded_at: The time the recipient responded to the invitation. :vartype responded_at: datetime - :ivar sender: Gets the name of the sender. - :vartype sender: str :ivar sent_at: Gets the time at which the invitation was sent. :vartype sent_at: datetime :param target_active_directory_id: The target Azure AD Id. Can't be @@ -1524,6 +1614,10 @@ class Invitation(ProxyDto): Must be specified along TargetActiveDirectoryId. This enables sending invitations to specific users or applications in an AD tenant. :type target_object_id: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -1533,8 +1627,9 @@ class Invitation(ProxyDto): 'invitation_id': {'readonly': True}, 'invitation_status': {'readonly': True}, 'responded_at': {'readonly': True}, - 'sender': {'readonly': True}, 'sent_at': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -1544,11 +1639,12 @@ class Invitation(ProxyDto): 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, - 'sender': {'key': 'properties.sender', 'type': 'str'}, 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, 'target_active_directory_id': {'key': 'properties.targetActiveDirectoryId', 'type': 'str'}, 'target_email': {'key': 'properties.targetEmail', 'type': 'str'}, 'target_object_id': {'key': 'properties.targetObjectId', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1556,11 +1652,270 @@ def __init__(self, **kwargs): self.invitation_id = None self.invitation_status = None self.responded_at = None - self.sender = None self.sent_at = None self.target_active_directory_id = kwargs.get('target_active_directory_id', None) self.target_email = kwargs.get('target_email', None) self.target_object_id = kwargs.get('target_object_id', None) + self.user_email = None + self.user_name = None + + +class KustoClusterDataSet(DataSet): + """A kusto cluster data set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar data_set_id: Unique id for identifying a data set resource + :vartype data_set_id: str + :param kusto_cluster_resource_id: Required. Resource id of the kusto + cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto cluster data + set. Possible values include: 'Succeeded', 'Creating', 'Deleting', + 'Moving', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KustoClusterDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.kusto_cluster_resource_id = kwargs.get('kusto_cluster_resource_id', None) + self.location = None + self.provisioning_state = None + self.kind = 'KustoCluster' + + +class KustoClusterDataSetMapping(DataSetMapping): + """A Kusto cluster data set mapping. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. + Possible values include: 'Ok', 'Broken' + :vartype data_set_mapping_status: str or + ~azure.mgmt.datashare.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto + cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KustoClusterDataSetMapping, self).__init__(**kwargs) + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kwargs.get('kusto_cluster_resource_id', None) + self.location = None + self.provisioning_state = None + self.kind = 'KustoCluster' + + +class KustoDatabaseDataSet(DataSet): + """A kusto database data set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar data_set_id: Unique id for identifying a data set resource + :vartype data_set_id: str + :param kusto_database_resource_id: Required. Resource id of the kusto + database. + :type kusto_database_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto database data + set. Possible values include: 'Succeeded', 'Creating', 'Deleting', + 'Moving', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_database_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_database_resource_id': {'key': 'properties.kustoDatabaseResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KustoDatabaseDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.kusto_database_resource_id = kwargs.get('kusto_database_resource_id', None) + self.location = None + self.provisioning_state = None + self.kind = 'KustoDatabase' + + +class KustoDatabaseDataSetMapping(DataSetMapping): + """A Kusto database data set mapping. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. + Possible values include: 'Ok', 'Broken' + :vartype data_set_mapping_status: str or + ~azure.mgmt.datashare.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto + cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KustoDatabaseDataSetMapping, self).__init__(**kwargs) + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kwargs.get('kusto_cluster_resource_id', None) + self.location = None + self.provisioning_state = None + self.kind = 'KustoDatabase' class OperationMetaLogSpecification(Model): @@ -1771,16 +2126,21 @@ class ProviderShareSubscription(ProxyDto): :vartype name: str :ivar type: Type of the azure resource :vartype type: str - :ivar company: Company name - :vartype company: str + :ivar consumer_email: Email of the consumer who created the share + subscription + :vartype consumer_email: str + :ivar consumer_name: Name of the consumer who created the share + subscription + :vartype consumer_name: str + :ivar consumer_tenant_name: Tenant name of the consumer who created the + share subscription + :vartype consumer_tenant_name: str :ivar created_at: created at :vartype created_at: datetime - :ivar created_by: Created by - :vartype created_by: str + :ivar provider_name: Name of the provider who created the share + :vartype provider_name: str :ivar shared_at: Shared at :vartype shared_at: datetime - :ivar shared_by: Shared by - :vartype shared_by: str :ivar share_subscription_object_id: share Subscription Object Id :vartype share_subscription_object_id: str :ivar share_subscription_status: Gets the status of share subscription. @@ -1793,11 +2153,12 @@ class ProviderShareSubscription(ProxyDto): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'company': {'readonly': True}, + 'consumer_email': {'readonly': True}, + 'consumer_name': {'readonly': True}, + 'consumer_tenant_name': {'readonly': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, + 'provider_name': {'readonly': True}, 'shared_at': {'readonly': True}, - 'shared_by': {'readonly': True}, 'share_subscription_object_id': {'readonly': True}, 'share_subscription_status': {'readonly': True}, } @@ -1806,22 +2167,24 @@ class ProviderShareSubscription(ProxyDto): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'company': {'key': 'properties.company', 'type': 'str'}, + 'consumer_email': {'key': 'properties.consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'properties.consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'properties.consumerTenantName', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, 'shared_at': {'key': 'properties.sharedAt', 'type': 'iso-8601'}, - 'shared_by': {'key': 'properties.sharedBy', 'type': 'str'}, 'share_subscription_object_id': {'key': 'properties.shareSubscriptionObjectId', 'type': 'str'}, 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, } def __init__(self, **kwargs): super(ProviderShareSubscription, self).__init__(**kwargs) - self.company = None + self.consumer_email = None + self.consumer_name = None + self.consumer_tenant_name = None self.created_at = None - self.created_by = None + self.provider_name = None self.shared_at = None - self.shared_by = None self.share_subscription_object_id = None self.share_subscription_status = None @@ -1950,9 +2313,6 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): :type kind: str :ivar created_at: Time at which the synchronization setting was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the synchronization - setting. - :vartype created_by: str :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or @@ -1963,6 +2323,8 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): ~azure.mgmt.datashare.models.RecurrenceInterval :param synchronization_time: Required. Synchronization time :type synchronization_time: datetime + :ivar user_name: Name of the user who created the synchronization setting. + :vartype user_name: str """ _validation = { @@ -1971,10 +2333,10 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'recurrence_interval': {'required': True}, 'synchronization_time': {'required': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -1983,19 +2345,19 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, **kwargs): super(ScheduledSynchronizationSetting, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.provisioning_state = None self.recurrence_interval = kwargs.get('recurrence_interval', None) self.synchronization_time = kwargs.get('synchronization_time', None) + self.user_name = None self.kind = 'ScheduleBased' @@ -2062,8 +2424,6 @@ class ScheduledTrigger(Trigger): :type kind: str :ivar created_at: Time at which the trigger was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the trigger. - :vartype created_by: str :ivar provisioning_state: Gets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or @@ -2081,6 +2441,8 @@ class ScheduledTrigger(Trigger): :ivar trigger_status: Gets the trigger state. Possible values include: 'Active', 'Inactive', 'SourceSynchronizationSettingDeleted' :vartype trigger_status: str or ~azure.mgmt.datashare.models.TriggerStatus + :ivar user_name: Name of the user who created the trigger. + :vartype user_name: str """ _validation = { @@ -2089,11 +2451,11 @@ class ScheduledTrigger(Trigger): 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'recurrence_interval': {'required': True}, 'synchronization_time': {'required': True}, 'trigger_status': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -2102,23 +2464,23 @@ class ScheduledTrigger(Trigger): 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, 'synchronization_mode': {'key': 'properties.synchronizationMode', 'type': 'str'}, 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, 'trigger_status': {'key': 'properties.triggerStatus', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, **kwargs): super(ScheduledTrigger, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.provisioning_state = None self.recurrence_interval = kwargs.get('recurrence_interval', None) self.synchronization_mode = kwargs.get('synchronization_mode', None) self.synchronization_time = kwargs.get('synchronization_time', None) self.trigger_status = None + self.user_name = None self.kind = 'ScheduleBased' @@ -2136,18 +2498,21 @@ class Share(ProxyDto): :vartype type: str :ivar created_at: Time at which the share was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the share. - :vartype created_by: str :param description: Share description. :type description: str :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.datashare.models.ProvisioningState - :param share_kind: Share kind. Possible values include: 'CopyBased' + :param share_kind: Share kind. Possible values include: 'CopyBased', + 'InPlace' :type share_kind: str or ~azure.mgmt.datashare.models.ShareKind :param terms: Share terms. :type terms: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -2155,8 +2520,9 @@ class Share(ProxyDto): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -2164,21 +2530,23 @@ class Share(ProxyDto): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, **kwargs): super(Share, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.description = kwargs.get('description', None) self.provisioning_state = None self.share_kind = kwargs.get('share_kind', None) self.terms = kwargs.get('terms', None) + self.user_email = None + self.user_name = None class ShareSubscription(ProxyDto): @@ -2197,10 +2565,15 @@ class ShareSubscription(ProxyDto): :vartype type: str :ivar created_at: Time at which the share subscription was created. :vartype created_at: datetime - :ivar created_by: The user who created the share subscription. - :vartype created_by: str :param invitation_id: Required. The invitation id. :type invitation_id: str + :ivar provider_email: Email of the provider who created the resource + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the + resource + :vartype provider_tenant_name: str :ivar provisioning_state: Provisioning state of the share subscription. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' @@ -2208,14 +2581,11 @@ class ShareSubscription(ProxyDto): ~azure.mgmt.datashare.models.ProvisioningState :ivar share_description: Description of share :vartype share_description: str - :ivar share_kind: Kind of share. Possible values include: 'CopyBased' + :ivar share_kind: Kind of share. Possible values include: 'CopyBased', + 'InPlace' :vartype share_kind: str or ~azure.mgmt.datashare.models.ShareKind :ivar share_name: Name of the share :vartype share_name: str - :ivar share_sender: Sender of the share - :vartype share_sender: str - :ivar share_sender_company_name: Company name of the share sender - :vartype share_sender_company_name: str :ivar share_subscription_status: Gets the current status of share subscription. Possible values include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking' @@ -2223,6 +2593,12 @@ class ShareSubscription(ProxyDto): ~azure.mgmt.datashare.models.ShareSubscriptionStatus :ivar share_terms: Terms of a share :vartype share_terms: str + :param source_share_location: Required. Source share location. + :type source_share_location: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -2230,16 +2606,19 @@ class ShareSubscription(ProxyDto): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'invitation_id': {'required': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'share_description': {'readonly': True}, 'share_kind': {'readonly': True}, 'share_name': {'readonly': True}, - 'share_sender': {'readonly': True}, - 'share_sender_company_name': {'readonly': True}, 'share_subscription_status': {'readonly': True}, 'share_terms': {'readonly': True}, + 'source_share_location': {'required': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -2247,31 +2626,37 @@ class ShareSubscription(ProxyDto): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'share_description': {'key': 'properties.shareDescription', 'type': 'str'}, 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, 'share_name': {'key': 'properties.shareName', 'type': 'str'}, - 'share_sender': {'key': 'properties.shareSender', 'type': 'str'}, - 'share_sender_company_name': {'key': 'properties.shareSenderCompanyName', 'type': 'str'}, 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, 'share_terms': {'key': 'properties.shareTerms', 'type': 'str'}, + 'source_share_location': {'key': 'properties.sourceShareLocation', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, **kwargs): super(ShareSubscription, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.invitation_id = kwargs.get('invitation_id', None) + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None self.provisioning_state = None self.share_description = None self.share_kind = None self.share_name = None - self.share_sender = None - self.share_sender_company_name = None self.share_subscription_status = None self.share_terms = None + self.source_share_location = kwargs.get('source_share_location', None) + self.user_email = None + self.user_name = None class ShareSubscriptionSynchronization(Model): @@ -2294,6 +2679,10 @@ class ShareSubscriptionSynchronization(Model): :vartype status: str :param synchronization_id: Required. Synchronization id :type synchronization_id: str + :ivar synchronization_mode: Synchronization Mode. Possible values include: + 'Incremental', 'FullSync' + :vartype synchronization_mode: str or + ~azure.mgmt.datashare.models.SynchronizationMode """ _validation = { @@ -2303,6 +2692,7 @@ class ShareSubscriptionSynchronization(Model): 'start_time': {'readonly': True}, 'status': {'readonly': True}, 'synchronization_id': {'required': True}, + 'synchronization_mode': {'readonly': True}, } _attribute_map = { @@ -2312,6 +2702,7 @@ class ShareSubscriptionSynchronization(Model): 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'status': {'key': 'status', 'type': 'str'}, 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -2322,54 +2713,73 @@ def __init__(self, **kwargs): self.start_time = None self.status = None self.synchronization_id = kwargs.get('synchronization_id', None) + self.synchronization_mode = None class ShareSynchronization(Model): """A ShareSynchronization data transfer object. - :param company: Company name - :type company: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :param consumer_email: Email of the user who created the synchronization + :type consumer_email: str + :param consumer_name: Name of the user who created the synchronization + :type consumer_name: str + :param consumer_tenant_name: Tenant name of the consumer who created the + synchronization + :type consumer_tenant_name: str :param duration_ms: synchronization duration :type duration_ms: int :param end_time: End time of synchronization :type end_time: datetime :param message: message of synchronization :type message: str - :param recipient: Recipient id - :type recipient: str :param start_time: start time of synchronization :type start_time: datetime :param status: Raw Status :type status: str :param synchronization_id: Synchronization id :type synchronization_id: str + :ivar synchronization_mode: Synchronization mode. Possible values include: + 'Incremental', 'FullSync' + :vartype synchronization_mode: str or + ~azure.mgmt.datashare.models.SynchronizationMode """ + _validation = { + 'synchronization_mode': {'readonly': True}, + } + _attribute_map = { - 'company': {'key': 'company', 'type': 'str'}, + 'consumer_email': {'key': 'consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'consumerTenantName', 'type': 'str'}, 'duration_ms': {'key': 'durationMs', 'type': 'int'}, 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, 'message': {'key': 'message', 'type': 'str'}, - 'recipient': {'key': 'recipient', 'type': 'str'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'status': {'key': 'status', 'type': 'str'}, 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, } def __init__(self, **kwargs): super(ShareSynchronization, self).__init__(**kwargs) - self.company = kwargs.get('company', None) + self.consumer_email = kwargs.get('consumer_email', None) + self.consumer_name = kwargs.get('consumer_name', None) + self.consumer_tenant_name = kwargs.get('consumer_tenant_name', None) self.duration_ms = kwargs.get('duration_ms', None) self.end_time = kwargs.get('end_time', None) self.message = kwargs.get('message', None) - self.recipient = kwargs.get('recipient', None) self.start_time = kwargs.get('start_time', None) self.status = kwargs.get('status', None) self.synchronization_id = kwargs.get('synchronization_id', None) + self.synchronization_mode = None class SqlDBTableDataSet(DataSet): - """A SQL DB table dataset. + """A SQL DB table data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -2384,13 +2794,15 @@ class SqlDBTableDataSet(DataSet): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param database_name: Database name of the source data set + :param database_name: Required. Database name of the source data set :type database_name: str :ivar data_set_id: Unique id for identifying a data set resource :vartype data_set_id: str - :param sql_server_resource_id: Resource id of SQL server + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str - :param table_name: SQL DB table name. + :param table_name: Required. SQL DB table name. :type table_name: str """ @@ -2399,7 +2811,11 @@ class SqlDBTableDataSet(DataSet): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'database_name': {'required': True}, 'data_set_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, } _attribute_map = { @@ -2409,6 +2825,7 @@ class SqlDBTableDataSet(DataSet): 'kind': {'key': 'kind', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } @@ -2417,13 +2834,14 @@ def __init__(self, **kwargs): super(SqlDBTableDataSet, self).__init__(**kwargs) self.database_name = kwargs.get('database_name', None) self.data_set_id = None + self.schema_name = kwargs.get('schema_name', None) self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) self.table_name = kwargs.get('table_name', None) self.kind = 'SqlDBTable' class SqlDBTableDataSetMapping(DataSetMapping): - """A SQL DB Table dataset mapping. + """A SQL DB Table data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -2440,12 +2858,19 @@ class SqlDBTableDataSetMapping(DataSetMapping): :type kind: str :param database_name: Required. DatabaseName name of the sink data set :type database_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str :param table_name: Required. SQL DB table name. @@ -2458,6 +2883,10 @@ class SqlDBTableDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'database_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, 'sql_server_resource_id': {'required': True}, 'table_name': {'required': True}, } @@ -2470,6 +2899,8 @@ class SqlDBTableDataSetMapping(DataSetMapping): 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } @@ -2478,14 +2909,16 @@ def __init__(self, **kwargs): super(SqlDBTableDataSetMapping, self).__init__(**kwargs) self.database_name = kwargs.get('database_name', None) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None + self.provisioning_state = None + self.schema_name = kwargs.get('schema_name', None) self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) self.table_name = kwargs.get('table_name', None) self.kind = 'SqlDBTable' class SqlDWTableDataSet(DataSet): - """A SQL DW table dataset. + """A SQL DW table data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -2502,11 +2935,14 @@ class SqlDWTableDataSet(DataSet): :type kind: str :ivar data_set_id: Unique id for identifying a data set resource :vartype data_set_id: str - :param data_warehouse_name: DataWarehouse name of the source data set + :param data_warehouse_name: Required. DataWarehouse name of the source + data set :type data_warehouse_name: str - :param sql_server_resource_id: Resource id of SQL server + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str - :param table_name: SQL DW table name. + :param table_name: Required. SQL DW table name. :type table_name: str """ @@ -2516,6 +2952,10 @@ class SqlDWTableDataSet(DataSet): 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, + 'data_warehouse_name': {'required': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, } _attribute_map = { @@ -2525,6 +2965,7 @@ class SqlDWTableDataSet(DataSet): 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } @@ -2533,13 +2974,14 @@ def __init__(self, **kwargs): super(SqlDWTableDataSet, self).__init__(**kwargs) self.data_set_id = None self.data_warehouse_name = kwargs.get('data_warehouse_name', None) + self.schema_name = kwargs.get('schema_name', None) self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) self.table_name = kwargs.get('table_name', None) self.kind = 'SqlDWTable' class SqlDWTableDataSetMapping(DataSetMapping): - """A SQL DW Table dataset mapping. + """A SQL DW Table data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -2554,15 +2996,22 @@ class SqlDWTableDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param data_warehouse_name: Required. DataWarehouse name of the source data set :type data_warehouse_name: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str :param table_name: Required. SQL DW table name. @@ -2574,7 +3023,11 @@ class SqlDWTableDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'data_warehouse_name': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, 'sql_server_resource_id': {'required': True}, 'table_name': {'required': True}, } @@ -2587,6 +3040,8 @@ class SqlDWTableDataSetMapping(DataSetMapping): 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } @@ -2594,53 +3049,55 @@ class SqlDWTableDataSetMapping(DataSetMapping): def __init__(self, **kwargs): super(SqlDWTableDataSetMapping, self).__init__(**kwargs) self.data_set_id = kwargs.get('data_set_id', None) - self.data_set_mapping_status = kwargs.get('data_set_mapping_status', None) + self.data_set_mapping_status = None self.data_warehouse_name = kwargs.get('data_warehouse_name', None) + self.provisioning_state = None + self.schema_name = kwargs.get('schema_name', None) self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) self.table_name = kwargs.get('table_name', None) self.kind = 'SqlDWTable' class SynchronizationDetails(Model): - """Synchronization details at dataset level. + """Synchronization details at data set level. Variables are only populated by the server, and will be ignored when sending a request. - :ivar data_set_id: id of dataSet + :ivar data_set_id: Id of data set :vartype data_set_id: str - :ivar data_set_type: type of DataSet. Possible values include: 'Blob', - 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', - 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'SqlDBTable', - 'SqlDWTable' + :ivar data_set_type: Type of the data set. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType - :ivar duration_ms: duration of dataset level copy + :ivar duration_ms: Duration of data set level copy :vartype duration_ms: int - :ivar end_time: End time of dataset level copy + :ivar end_time: End time of data set level copy :vartype end_time: datetime - :ivar files_read: The number of files read from the source dataset. + :ivar files_read: The number of files read from the source data set :vartype files_read: long - :ivar files_written: The number of files written into the sink dataset. + :ivar files_written: The number of files written into the sink data set :vartype files_written: long - :ivar message: Error Message if any + :ivar message: Error message if any :vartype message: str - :ivar name: name of dataSet + :ivar name: Name of the data set :vartype name: str - :ivar rows_copied: The number of files copied into the sink dataset. + :ivar rows_copied: The number of files copied into the sink data set :vartype rows_copied: long - :ivar rows_read: The number of rows read from the source dataset. + :ivar rows_read: The number of rows read from the source data set. :vartype rows_read: long - :ivar size_read: The size of the data read from the source dataset in - bytes. + :ivar size_read: The size of the data read from the source data set in + bytes :vartype size_read: long - :ivar size_written: The size of the data written into the sink dataset in - bytes. + :ivar size_written: The size of the data written into the sink data set in + bytes :vartype size_written: long - :ivar start_time: start time of dataset level copy + :ivar start_time: Start time of data set level copy :vartype start_time: datetime :ivar status: Raw Status :vartype status: str - :ivar v_core: The vCore units consumed for the dataset synchronization. + :ivar v_core: The vCore units consumed for the data set synchronization :vartype v_core: long """ diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py index 41d0603e9c0c..1e8fcd49c5de 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py @@ -76,12 +76,14 @@ class Account(DefaultDto): :type identity: ~azure.mgmt.datashare.models.Identity :ivar created_at: Time at which the account was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the account. - :vartype created_by: str :ivar provisioning_state: Provisioning state of the Account. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.datashare.models.ProvisioningState + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -90,8 +92,9 @@ class Account(DefaultDto): 'type': {'readonly': True}, 'identity': {'required': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -102,16 +105,18 @@ class Account(DefaultDto): 'type': {'key': 'type', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, *, identity, location: str=None, tags=None, **kwargs) -> None: super(Account, self).__init__(location=location, tags=tags, **kwargs) self.identity = identity self.created_at = None - self.created_by = None self.provisioning_state = None + self.user_email = None + self.user_name = None class AccountUpdateParameters(Model): @@ -169,8 +174,8 @@ class DataSet(ProxyDto): You probably want to use the sub-classes and not this class directly. Known sub-classes are: BlobDataSet, BlobFolderDataSet, BlobContainerDataSet, ADLSGen2FileDataSet, ADLSGen2FolderDataSet, ADLSGen2FileSystemDataSet, - ADLSGen1FolderDataSet, ADLSGen1FileDataSet, SqlDWTableDataSet, - SqlDBTableDataSet + ADLSGen1FolderDataSet, ADLSGen1FileDataSet, KustoClusterDataSet, + KustoDatabaseDataSet, SqlDWTableDataSet, SqlDBTableDataSet Variables are only populated by the server, and will be ignored when sending a request. @@ -202,7 +207,7 @@ class DataSet(ProxyDto): } _subtype_map = { - 'kind': {'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen1File': 'ADLSGen1FileDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SqlDBTable': 'SqlDBTableDataSet'} + 'kind': {'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen1File': 'ADLSGen1FileDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SqlDBTable': 'SqlDBTableDataSet'} } def __init__(self, **kwargs) -> None: @@ -212,7 +217,7 @@ def __init__(self, **kwargs) -> None: class ADLSGen1FileDataSet(DataSet): - """An ADLS Gen 1 file dataset. + """An ADLS Gen 1 file data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -279,7 +284,7 @@ def __init__(self, *, account_name: str, file_name: str, folder_path: str, resou class ADLSGen1FolderDataSet(DataSet): - """An ADLS Gen 1 folder dataset. + """An ADLS Gen 1 folder data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -341,7 +346,7 @@ def __init__(self, *, account_name: str, folder_path: str, resource_group: str, class ADLSGen2FileDataSet(DataSet): - """An ADLS Gen 2 file dataset. + """An ADLS Gen 2 file data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -409,12 +414,13 @@ def __init__(self, *, file_path: str, file_system: str, resource_group: str, sto class DataSetMapping(ProxyDto): - """A dataset mapping data transfer object. + """A data set mapping data transfer object. You probably want to use the sub-classes and not this class directly. Known sub-classes are: BlobDataSetMapping, BlobFolderDataSetMapping, BlobContainerDataSetMapping, ADLSGen2FileDataSetMapping, ADLSGen2FolderDataSetMapping, ADLSGen2FileSystemDataSetMapping, + KustoClusterDataSetMapping, KustoDatabaseDataSetMapping, SqlDWTableDataSetMapping, SqlDBTableDataSetMapping Variables are only populated by the server, and will be ignored when @@ -447,7 +453,7 @@ class DataSetMapping(ProxyDto): } _subtype_map = { - 'kind': {'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping'} + 'kind': {'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping'} } def __init__(self, **kwargs) -> None: @@ -457,7 +463,7 @@ def __init__(self, **kwargs) -> None: class ADLSGen2FileDataSetMapping(DataSetMapping): - """An ADLS Gen2 file dataset mapping. + """An ADLS Gen2 file data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -472,11 +478,11 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_path: Required. File path within the file system. :type file_path: str @@ -485,6 +491,11 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): :param output_type: Type of output file. Possible values include: 'Csv', 'Parquet' :type output_type: str or ~azure.mgmt.datashare.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -499,8 +510,11 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_path': {'required': True}, 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -516,18 +530,20 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): 'file_path': {'key': 'properties.filePath', 'type': 'str'}, 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } - def __init__(self, *, file_path: str, file_system: str, resource_group: str, storage_account_name: str, subscription_id: str, data_set_id: str=None, data_set_mapping_status=None, output_type=None, **kwargs) -> None: + def __init__(self, *, data_set_id: str, file_path: str, file_system: str, resource_group: str, storage_account_name: str, subscription_id: str, output_type=None, **kwargs) -> None: super(ADLSGen2FileDataSetMapping, self).__init__(**kwargs) self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None self.file_path = file_path self.file_system = file_system self.output_type = output_type + self.provisioning_state = None self.resource_group = resource_group self.storage_account_name = storage_account_name self.subscription_id = subscription_id @@ -535,7 +551,7 @@ def __init__(self, *, file_path: str, file_system: str, resource_group: str, sto class ADLSGen2FileSystemDataSet(DataSet): - """An ADLS Gen 2 file system dataset. + """An ADLS Gen 2 file system data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -598,7 +614,7 @@ def __init__(self, *, file_system: str, resource_group: str, storage_account_nam class ADLSGen2FileSystemDataSetMapping(DataSetMapping): - """An ADLS Gen2 file system dataset mapping. + """An ADLS Gen2 file system data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -613,14 +629,19 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_system: Required. The file system name. :type file_system: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -635,7 +656,10 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -649,16 +673,18 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } - def __init__(self, *, file_system: str, resource_group: str, storage_account_name: str, subscription_id: str, data_set_id: str=None, data_set_mapping_status=None, **kwargs) -> None: + def __init__(self, *, data_set_id: str, file_system: str, resource_group: str, storage_account_name: str, subscription_id: str, **kwargs) -> None: super(ADLSGen2FileSystemDataSetMapping, self).__init__(**kwargs) self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None self.file_system = file_system + self.provisioning_state = None self.resource_group = resource_group self.storage_account_name = storage_account_name self.subscription_id = subscription_id @@ -666,7 +692,7 @@ def __init__(self, *, file_system: str, resource_group: str, storage_account_nam class ADLSGen2FolderDataSet(DataSet): - """An ADLS Gen 2 folder dataset. + """An ADLS Gen 2 folder data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -734,7 +760,7 @@ def __init__(self, *, file_system: str, folder_path: str, resource_group: str, s class ADLSGen2FolderDataSetMapping(DataSetMapping): - """An ADLS Gen2 folder dataset mapping. + """An ADLS Gen2 folder data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -749,16 +775,21 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_system: Required. File system to which the folder belongs. :type file_system: str :param folder_path: Required. Folder path within the file system. :type folder_path: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -773,8 +804,11 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_system': {'required': True}, 'folder_path': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -789,17 +823,19 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } - def __init__(self, *, file_system: str, folder_path: str, resource_group: str, storage_account_name: str, subscription_id: str, data_set_id: str=None, data_set_mapping_status=None, **kwargs) -> None: + def __init__(self, *, data_set_id: str, file_system: str, folder_path: str, resource_group: str, storage_account_name: str, subscription_id: str, **kwargs) -> None: super(ADLSGen2FolderDataSetMapping, self).__init__(**kwargs) self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None self.file_system = file_system self.folder_path = folder_path + self.provisioning_state = None self.resource_group = resource_group self.storage_account_name = storage_account_name self.subscription_id = subscription_id @@ -807,7 +843,7 @@ def __init__(self, *, file_system: str, folder_path: str, resource_group: str, s class BlobContainerDataSet(DataSet): - """An Azure storage blob container dataset. + """An Azure storage blob container data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -870,7 +906,7 @@ def __init__(self, *, container_name: str, resource_group: str, storage_account_ class BlobContainerDataSetMapping(DataSetMapping): - """A Blob container dataset mapping. + """A Blob container data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -887,12 +923,17 @@ class BlobContainerDataSetMapping(DataSetMapping): :type kind: str :param container_name: Required. BLOB Container name. :type container_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -908,6 +949,9 @@ class BlobContainerDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -921,16 +965,18 @@ class BlobContainerDataSetMapping(DataSetMapping): 'container_name': {'key': 'properties.containerName', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } - def __init__(self, *, container_name: str, resource_group: str, storage_account_name: str, subscription_id: str, data_set_id: str=None, data_set_mapping_status=None, **kwargs) -> None: + def __init__(self, *, container_name: str, data_set_id: str, resource_group: str, storage_account_name: str, subscription_id: str, **kwargs) -> None: super(BlobContainerDataSetMapping, self).__init__(**kwargs) self.container_name = container_name self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None + self.provisioning_state = None self.resource_group = resource_group self.storage_account_name = storage_account_name self.subscription_id = subscription_id @@ -938,7 +984,7 @@ def __init__(self, *, container_name: str, resource_group: str, storage_account_ class BlobDataSet(DataSet): - """An Azure storage blob dataset. + """An Azure storage blob data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -1006,7 +1052,7 @@ def __init__(self, *, container_name: str, file_path: str, resource_group: str, class BlobDataSetMapping(DataSetMapping): - """A Blob dataset mapping. + """A Blob data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -1023,17 +1069,22 @@ class BlobDataSetMapping(DataSetMapping): :type kind: str :param container_name: Required. Container that has the file path. :type container_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param file_path: Required. File path within the source data set :type file_path: str :param output_type: File output type. Possible values include: 'Csv', 'Parquet' :type output_type: str or ~azure.mgmt.datashare.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -1049,7 +1100,10 @@ class BlobDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'file_path': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -1065,18 +1119,20 @@ class BlobDataSetMapping(DataSetMapping): 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'file_path': {'key': 'properties.filePath', 'type': 'str'}, 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } - def __init__(self, *, container_name: str, file_path: str, resource_group: str, storage_account_name: str, subscription_id: str, data_set_id: str=None, data_set_mapping_status=None, output_type=None, **kwargs) -> None: + def __init__(self, *, container_name: str, data_set_id: str, file_path: str, resource_group: str, storage_account_name: str, subscription_id: str, output_type=None, **kwargs) -> None: super(BlobDataSetMapping, self).__init__(**kwargs) self.container_name = container_name self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None self.file_path = file_path self.output_type = output_type + self.provisioning_state = None self.resource_group = resource_group self.storage_account_name = storage_account_name self.subscription_id = subscription_id @@ -1084,7 +1140,7 @@ def __init__(self, *, container_name: str, file_path: str, resource_group: str, class BlobFolderDataSet(DataSet): - """An Azure storage blob folder dataset. + """An Azure storage blob folder data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -1152,7 +1208,7 @@ def __init__(self, *, container_name: str, prefix: str, resource_group: str, sto class BlobFolderDataSetMapping(DataSetMapping): - """A Blob folder dataset mapping. + """A Blob folder data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -1169,14 +1225,19 @@ class BlobFolderDataSetMapping(DataSetMapping): :type kind: str :param container_name: Required. Container that has the file path. :type container_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param prefix: Required. Prefix for blob folder :type prefix: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState :param resource_group: Required. Resource group of storage account. :type resource_group: str :param storage_account_name: Required. Storage account name of the source @@ -1192,7 +1253,10 @@ class BlobFolderDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'prefix': {'required': True}, + 'provisioning_state': {'readonly': True}, 'resource_group': {'required': True}, 'storage_account_name': {'required': True}, 'subscription_id': {'required': True}, @@ -1207,17 +1271,19 @@ class BlobFolderDataSetMapping(DataSetMapping): 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, } - def __init__(self, *, container_name: str, prefix: str, resource_group: str, storage_account_name: str, subscription_id: str, data_set_id: str=None, data_set_mapping_status=None, **kwargs) -> None: + def __init__(self, *, container_name: str, data_set_id: str, prefix: str, resource_group: str, storage_account_name: str, subscription_id: str, **kwargs) -> None: super(BlobFolderDataSetMapping, self).__init__(**kwargs) self.container_name = container_name self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None self.prefix = prefix + self.provisioning_state = None self.resource_group = resource_group self.storage_account_name = storage_account_name self.subscription_id = subscription_id @@ -1258,18 +1324,25 @@ class ConsumerInvitation(ProxyDto): ~azure.mgmt.datashare.models.InvitationStatus :ivar location: invitation location :vartype location: str + :ivar provider_email: Email of the provider who created the resource + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the + resource + :vartype provider_tenant_name: str :ivar responded_at: The time the recipient responded to the invitation. :vartype responded_at: datetime - :ivar sender: Gets the name of the sender. - :vartype sender: str - :ivar sender_company_name: Gets the company name of the sender. - :vartype sender_company_name: str :ivar sent_at: Gets the time at which the invitation was sent. :vartype sent_at: datetime :ivar share_name: Gets the source share Name. :vartype share_name: str :ivar terms_of_use: Terms of use shared when the invitation was created :vartype terms_of_use: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -1281,12 +1354,15 @@ class ConsumerInvitation(ProxyDto): 'invitation_id': {'required': True}, 'invitation_status': {'readonly': True}, 'location': {'readonly': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, 'responded_at': {'readonly': True}, - 'sender': {'readonly': True}, - 'sender_company_name': {'readonly': True}, 'sent_at': {'readonly': True}, 'share_name': {'readonly': True}, 'terms_of_use': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -1298,12 +1374,15 @@ class ConsumerInvitation(ProxyDto): 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'location': {'key': 'properties.location', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, - 'sender': {'key': 'properties.sender', 'type': 'str'}, - 'sender_company_name': {'key': 'properties.senderCompanyName', 'type': 'str'}, 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, 'share_name': {'key': 'properties.shareName', 'type': 'str'}, 'terms_of_use': {'key': 'properties.termsOfUse', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, *, invitation_id: str, **kwargs) -> None: @@ -1313,12 +1392,15 @@ def __init__(self, *, invitation_id: str, **kwargs) -> None: self.invitation_id = invitation_id self.invitation_status = None self.location = None + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None self.responded_at = None - self.sender = None - self.sender_company_name = None self.sent_at = None self.share_name = None self.terms_of_use = None + self.user_email = None + self.user_name = None class ConsumerSourceDataSet(ProxyDto): @@ -1335,12 +1417,16 @@ class ConsumerSourceDataSet(ProxyDto): :vartype type: str :ivar data_set_id: DataSet Id :vartype data_set_id: str + :ivar data_set_location: Location of the data set. + :vartype data_set_location: str :ivar data_set_name: DataSet name :vartype data_set_name: str - :ivar data_set_type: Type of dataSet. Possible values include: 'Blob', + :ivar data_set_path: DataSet path + :vartype data_set_path: str + :ivar data_set_type: Type of data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', - 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'SqlDBTable', - 'SqlDWTable' + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType """ @@ -1349,7 +1435,9 @@ class ConsumerSourceDataSet(ProxyDto): 'name': {'readonly': True}, 'type': {'readonly': True}, 'data_set_id': {'readonly': True}, + 'data_set_location': {'readonly': True}, 'data_set_name': {'readonly': True}, + 'data_set_path': {'readonly': True}, 'data_set_type': {'readonly': True}, } @@ -1358,14 +1446,18 @@ class ConsumerSourceDataSet(ProxyDto): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_location': {'key': 'properties.dataSetLocation', 'type': 'str'}, 'data_set_name': {'key': 'properties.dataSetName', 'type': 'str'}, + 'data_set_path': {'key': 'properties.dataSetPath', 'type': 'str'}, 'data_set_type': {'key': 'properties.dataSetType', 'type': 'str'}, } def __init__(self, **kwargs) -> None: super(ConsumerSourceDataSet, self).__init__(**kwargs) self.data_set_id = None + self.data_set_location = None self.data_set_name = None + self.data_set_path = None self.data_set_type = None @@ -1510,8 +1602,6 @@ class Invitation(ProxyDto): ~azure.mgmt.datashare.models.InvitationStatus :ivar responded_at: The time the recipient responded to the invitation. :vartype responded_at: datetime - :ivar sender: Gets the name of the sender. - :vartype sender: str :ivar sent_at: Gets the time at which the invitation was sent. :vartype sent_at: datetime :param target_active_directory_id: The target Azure AD Id. Can't be @@ -1524,6 +1614,10 @@ class Invitation(ProxyDto): Must be specified along TargetActiveDirectoryId. This enables sending invitations to specific users or applications in an AD tenant. :type target_object_id: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -1533,8 +1627,9 @@ class Invitation(ProxyDto): 'invitation_id': {'readonly': True}, 'invitation_status': {'readonly': True}, 'responded_at': {'readonly': True}, - 'sender': {'readonly': True}, 'sent_at': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -1544,11 +1639,12 @@ class Invitation(ProxyDto): 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, - 'sender': {'key': 'properties.sender', 'type': 'str'}, 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, 'target_active_directory_id': {'key': 'properties.targetActiveDirectoryId', 'type': 'str'}, 'target_email': {'key': 'properties.targetEmail', 'type': 'str'}, 'target_object_id': {'key': 'properties.targetObjectId', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, *, target_active_directory_id: str=None, target_email: str=None, target_object_id: str=None, **kwargs) -> None: @@ -1556,11 +1652,270 @@ def __init__(self, *, target_active_directory_id: str=None, target_email: str=No self.invitation_id = None self.invitation_status = None self.responded_at = None - self.sender = None self.sent_at = None self.target_active_directory_id = target_active_directory_id self.target_email = target_email self.target_object_id = target_object_id + self.user_email = None + self.user_name = None + + +class KustoClusterDataSet(DataSet): + """A kusto cluster data set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar data_set_id: Unique id for identifying a data set resource + :vartype data_set_id: str + :param kusto_cluster_resource_id: Required. Resource id of the kusto + cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto cluster data + set. Possible values include: 'Succeeded', 'Creating', 'Deleting', + 'Moving', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, kusto_cluster_resource_id: str, **kwargs) -> None: + super(KustoClusterDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.kusto_cluster_resource_id = kusto_cluster_resource_id + self.location = None + self.provisioning_state = None + self.kind = 'KustoCluster' + + +class KustoClusterDataSetMapping(DataSetMapping): + """A Kusto cluster data set mapping. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. + Possible values include: 'Ok', 'Broken' + :vartype data_set_mapping_status: str or + ~azure.mgmt.datashare.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto + cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, data_set_id: str, kusto_cluster_resource_id: str, **kwargs) -> None: + super(KustoClusterDataSetMapping, self).__init__(**kwargs) + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kusto_cluster_resource_id + self.location = None + self.provisioning_state = None + self.kind = 'KustoCluster' + + +class KustoDatabaseDataSet(DataSet): + """A kusto database data set. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar data_set_id: Unique id for identifying a data set resource + :vartype data_set_id: str + :param kusto_database_resource_id: Required. Resource id of the kusto + database. + :type kusto_database_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto database data + set. Possible values include: 'Succeeded', 'Creating', 'Deleting', + 'Moving', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_database_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_database_resource_id': {'key': 'properties.kustoDatabaseResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, kusto_database_resource_id: str, **kwargs) -> None: + super(KustoDatabaseDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.kusto_database_resource_id = kusto_database_resource_id + self.location = None + self.provisioning_state = None + self.kind = 'KustoDatabase' + + +class KustoDatabaseDataSetMapping(DataSetMapping): + """A Kusto database data set mapping. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource + :vartype id: str + :ivar name: Name of the azure resource + :vartype name: str + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. + Possible values include: 'Ok', 'Broken' + :vartype data_set_mapping_status: str or + ~azure.mgmt.datashare.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto + cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, data_set_id: str, kusto_cluster_resource_id: str, **kwargs) -> None: + super(KustoDatabaseDataSetMapping, self).__init__(**kwargs) + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kusto_cluster_resource_id + self.location = None + self.provisioning_state = None + self.kind = 'KustoDatabase' class OperationMetaLogSpecification(Model): @@ -1771,16 +2126,21 @@ class ProviderShareSubscription(ProxyDto): :vartype name: str :ivar type: Type of the azure resource :vartype type: str - :ivar company: Company name - :vartype company: str + :ivar consumer_email: Email of the consumer who created the share + subscription + :vartype consumer_email: str + :ivar consumer_name: Name of the consumer who created the share + subscription + :vartype consumer_name: str + :ivar consumer_tenant_name: Tenant name of the consumer who created the + share subscription + :vartype consumer_tenant_name: str :ivar created_at: created at :vartype created_at: datetime - :ivar created_by: Created by - :vartype created_by: str + :ivar provider_name: Name of the provider who created the share + :vartype provider_name: str :ivar shared_at: Shared at :vartype shared_at: datetime - :ivar shared_by: Shared by - :vartype shared_by: str :ivar share_subscription_object_id: share Subscription Object Id :vartype share_subscription_object_id: str :ivar share_subscription_status: Gets the status of share subscription. @@ -1793,11 +2153,12 @@ class ProviderShareSubscription(ProxyDto): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'company': {'readonly': True}, + 'consumer_email': {'readonly': True}, + 'consumer_name': {'readonly': True}, + 'consumer_tenant_name': {'readonly': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, + 'provider_name': {'readonly': True}, 'shared_at': {'readonly': True}, - 'shared_by': {'readonly': True}, 'share_subscription_object_id': {'readonly': True}, 'share_subscription_status': {'readonly': True}, } @@ -1806,22 +2167,24 @@ class ProviderShareSubscription(ProxyDto): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'company': {'key': 'properties.company', 'type': 'str'}, + 'consumer_email': {'key': 'properties.consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'properties.consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'properties.consumerTenantName', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, 'shared_at': {'key': 'properties.sharedAt', 'type': 'iso-8601'}, - 'shared_by': {'key': 'properties.sharedBy', 'type': 'str'}, 'share_subscription_object_id': {'key': 'properties.shareSubscriptionObjectId', 'type': 'str'}, 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, } def __init__(self, **kwargs) -> None: super(ProviderShareSubscription, self).__init__(**kwargs) - self.company = None + self.consumer_email = None + self.consumer_name = None + self.consumer_tenant_name = None self.created_at = None - self.created_by = None + self.provider_name = None self.shared_at = None - self.shared_by = None self.share_subscription_object_id = None self.share_subscription_status = None @@ -1950,9 +2313,6 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): :type kind: str :ivar created_at: Time at which the synchronization setting was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the synchronization - setting. - :vartype created_by: str :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or @@ -1963,6 +2323,8 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): ~azure.mgmt.datashare.models.RecurrenceInterval :param synchronization_time: Required. Synchronization time :type synchronization_time: datetime + :ivar user_name: Name of the user who created the synchronization setting. + :vartype user_name: str """ _validation = { @@ -1971,10 +2333,10 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'recurrence_interval': {'required': True}, 'synchronization_time': {'required': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -1983,19 +2345,19 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, *, recurrence_interval, synchronization_time, **kwargs) -> None: super(ScheduledSynchronizationSetting, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.provisioning_state = None self.recurrence_interval = recurrence_interval self.synchronization_time = synchronization_time + self.user_name = None self.kind = 'ScheduleBased' @@ -2062,8 +2424,6 @@ class ScheduledTrigger(Trigger): :type kind: str :ivar created_at: Time at which the trigger was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the trigger. - :vartype created_by: str :ivar provisioning_state: Gets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or @@ -2081,6 +2441,8 @@ class ScheduledTrigger(Trigger): :ivar trigger_status: Gets the trigger state. Possible values include: 'Active', 'Inactive', 'SourceSynchronizationSettingDeleted' :vartype trigger_status: str or ~azure.mgmt.datashare.models.TriggerStatus + :ivar user_name: Name of the user who created the trigger. + :vartype user_name: str """ _validation = { @@ -2089,11 +2451,11 @@ class ScheduledTrigger(Trigger): 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'recurrence_interval': {'required': True}, 'synchronization_time': {'required': True}, 'trigger_status': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -2102,23 +2464,23 @@ class ScheduledTrigger(Trigger): 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, 'synchronization_mode': {'key': 'properties.synchronizationMode', 'type': 'str'}, 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, 'trigger_status': {'key': 'properties.triggerStatus', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, *, recurrence_interval, synchronization_time, synchronization_mode=None, **kwargs) -> None: super(ScheduledTrigger, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.provisioning_state = None self.recurrence_interval = recurrence_interval self.synchronization_mode = synchronization_mode self.synchronization_time = synchronization_time self.trigger_status = None + self.user_name = None self.kind = 'ScheduleBased' @@ -2136,18 +2498,21 @@ class Share(ProxyDto): :vartype type: str :ivar created_at: Time at which the share was created. :vartype created_at: datetime - :ivar created_by: Name of the user who created the share. - :vartype created_by: str :param description: Share description. :type description: str :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' :vartype provisioning_state: str or ~azure.mgmt.datashare.models.ProvisioningState - :param share_kind: Share kind. Possible values include: 'CopyBased' + :param share_kind: Share kind. Possible values include: 'CopyBased', + 'InPlace' :type share_kind: str or ~azure.mgmt.datashare.models.ShareKind :param terms: Share terms. :type terms: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -2155,8 +2520,9 @@ class Share(ProxyDto): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -2164,21 +2530,23 @@ class Share(ProxyDto): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } def __init__(self, *, description: str=None, share_kind=None, terms: str=None, **kwargs) -> None: super(Share, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.description = description self.provisioning_state = None self.share_kind = share_kind self.terms = terms + self.user_email = None + self.user_name = None class ShareSubscription(ProxyDto): @@ -2197,10 +2565,15 @@ class ShareSubscription(ProxyDto): :vartype type: str :ivar created_at: Time at which the share subscription was created. :vartype created_at: datetime - :ivar created_by: The user who created the share subscription. - :vartype created_by: str :param invitation_id: Required. The invitation id. :type invitation_id: str + :ivar provider_email: Email of the provider who created the resource + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the + resource + :vartype provider_tenant_name: str :ivar provisioning_state: Provisioning state of the share subscription. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed' @@ -2208,14 +2581,11 @@ class ShareSubscription(ProxyDto): ~azure.mgmt.datashare.models.ProvisioningState :ivar share_description: Description of share :vartype share_description: str - :ivar share_kind: Kind of share. Possible values include: 'CopyBased' + :ivar share_kind: Kind of share. Possible values include: 'CopyBased', + 'InPlace' :vartype share_kind: str or ~azure.mgmt.datashare.models.ShareKind :ivar share_name: Name of the share :vartype share_name: str - :ivar share_sender: Sender of the share - :vartype share_sender: str - :ivar share_sender_company_name: Company name of the share sender - :vartype share_sender_company_name: str :ivar share_subscription_status: Gets the current status of share subscription. Possible values include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking' @@ -2223,6 +2593,12 @@ class ShareSubscription(ProxyDto): ~azure.mgmt.datashare.models.ShareSubscriptionStatus :ivar share_terms: Terms of a share :vartype share_terms: str + :param source_share_location: Required. Source share location. + :type source_share_location: str + :ivar user_email: Email of the user who created the resource + :vartype user_email: str + :ivar user_name: Name of the user who created the resource + :vartype user_name: str """ _validation = { @@ -2230,16 +2606,19 @@ class ShareSubscription(ProxyDto): 'name': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, - 'created_by': {'readonly': True}, 'invitation_id': {'required': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'share_description': {'readonly': True}, 'share_kind': {'readonly': True}, 'share_name': {'readonly': True}, - 'share_sender': {'readonly': True}, - 'share_sender_company_name': {'readonly': True}, 'share_subscription_status': {'readonly': True}, 'share_terms': {'readonly': True}, + 'source_share_location': {'required': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, } _attribute_map = { @@ -2247,31 +2626,37 @@ class ShareSubscription(ProxyDto): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, - 'created_by': {'key': 'properties.createdBy', 'type': 'str'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'share_description': {'key': 'properties.shareDescription', 'type': 'str'}, 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, 'share_name': {'key': 'properties.shareName', 'type': 'str'}, - 'share_sender': {'key': 'properties.shareSender', 'type': 'str'}, - 'share_sender_company_name': {'key': 'properties.shareSenderCompanyName', 'type': 'str'}, 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, 'share_terms': {'key': 'properties.shareTerms', 'type': 'str'}, + 'source_share_location': {'key': 'properties.sourceShareLocation', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, } - def __init__(self, *, invitation_id: str, **kwargs) -> None: + def __init__(self, *, invitation_id: str, source_share_location: str, **kwargs) -> None: super(ShareSubscription, self).__init__(**kwargs) self.created_at = None - self.created_by = None self.invitation_id = invitation_id + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None self.provisioning_state = None self.share_description = None self.share_kind = None self.share_name = None - self.share_sender = None - self.share_sender_company_name = None self.share_subscription_status = None self.share_terms = None + self.source_share_location = source_share_location + self.user_email = None + self.user_name = None class ShareSubscriptionSynchronization(Model): @@ -2294,6 +2679,10 @@ class ShareSubscriptionSynchronization(Model): :vartype status: str :param synchronization_id: Required. Synchronization id :type synchronization_id: str + :ivar synchronization_mode: Synchronization Mode. Possible values include: + 'Incremental', 'FullSync' + :vartype synchronization_mode: str or + ~azure.mgmt.datashare.models.SynchronizationMode """ _validation = { @@ -2303,6 +2692,7 @@ class ShareSubscriptionSynchronization(Model): 'start_time': {'readonly': True}, 'status': {'readonly': True}, 'synchronization_id': {'required': True}, + 'synchronization_mode': {'readonly': True}, } _attribute_map = { @@ -2312,6 +2702,7 @@ class ShareSubscriptionSynchronization(Model): 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'status': {'key': 'status', 'type': 'str'}, 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, } def __init__(self, *, synchronization_id: str, **kwargs) -> None: @@ -2322,54 +2713,73 @@ def __init__(self, *, synchronization_id: str, **kwargs) -> None: self.start_time = None self.status = None self.synchronization_id = synchronization_id + self.synchronization_mode = None class ShareSynchronization(Model): """A ShareSynchronization data transfer object. - :param company: Company name - :type company: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :param consumer_email: Email of the user who created the synchronization + :type consumer_email: str + :param consumer_name: Name of the user who created the synchronization + :type consumer_name: str + :param consumer_tenant_name: Tenant name of the consumer who created the + synchronization + :type consumer_tenant_name: str :param duration_ms: synchronization duration :type duration_ms: int :param end_time: End time of synchronization :type end_time: datetime :param message: message of synchronization :type message: str - :param recipient: Recipient id - :type recipient: str :param start_time: start time of synchronization :type start_time: datetime :param status: Raw Status :type status: str :param synchronization_id: Synchronization id :type synchronization_id: str + :ivar synchronization_mode: Synchronization mode. Possible values include: + 'Incremental', 'FullSync' + :vartype synchronization_mode: str or + ~azure.mgmt.datashare.models.SynchronizationMode """ + _validation = { + 'synchronization_mode': {'readonly': True}, + } + _attribute_map = { - 'company': {'key': 'company', 'type': 'str'}, + 'consumer_email': {'key': 'consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'consumerTenantName', 'type': 'str'}, 'duration_ms': {'key': 'durationMs', 'type': 'int'}, 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, 'message': {'key': 'message', 'type': 'str'}, - 'recipient': {'key': 'recipient', 'type': 'str'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'status': {'key': 'status', 'type': 'str'}, 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, } - def __init__(self, *, company: str=None, duration_ms: int=None, end_time=None, message: str=None, recipient: str=None, start_time=None, status: str=None, synchronization_id: str=None, **kwargs) -> None: + def __init__(self, *, consumer_email: str=None, consumer_name: str=None, consumer_tenant_name: str=None, duration_ms: int=None, end_time=None, message: str=None, start_time=None, status: str=None, synchronization_id: str=None, **kwargs) -> None: super(ShareSynchronization, self).__init__(**kwargs) - self.company = company + self.consumer_email = consumer_email + self.consumer_name = consumer_name + self.consumer_tenant_name = consumer_tenant_name self.duration_ms = duration_ms self.end_time = end_time self.message = message - self.recipient = recipient self.start_time = start_time self.status = status self.synchronization_id = synchronization_id + self.synchronization_mode = None class SqlDBTableDataSet(DataSet): - """A SQL DB table dataset. + """A SQL DB table data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -2384,13 +2794,15 @@ class SqlDBTableDataSet(DataSet): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param database_name: Database name of the source data set + :param database_name: Required. Database name of the source data set :type database_name: str :ivar data_set_id: Unique id for identifying a data set resource :vartype data_set_id: str - :param sql_server_resource_id: Resource id of SQL server + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str - :param table_name: SQL DB table name. + :param table_name: Required. SQL DB table name. :type table_name: str """ @@ -2399,7 +2811,11 @@ class SqlDBTableDataSet(DataSet): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'database_name': {'required': True}, 'data_set_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, } _attribute_map = { @@ -2409,21 +2825,23 @@ class SqlDBTableDataSet(DataSet): 'kind': {'key': 'kind', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } - def __init__(self, *, database_name: str=None, sql_server_resource_id: str=None, table_name: str=None, **kwargs) -> None: + def __init__(self, *, database_name: str, schema_name: str, sql_server_resource_id: str, table_name: str, **kwargs) -> None: super(SqlDBTableDataSet, self).__init__(**kwargs) self.database_name = database_name self.data_set_id = None + self.schema_name = schema_name self.sql_server_resource_id = sql_server_resource_id self.table_name = table_name self.kind = 'SqlDBTable' class SqlDBTableDataSetMapping(DataSetMapping): - """A SQL DB Table dataset mapping. + """A SQL DB Table data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -2440,12 +2858,19 @@ class SqlDBTableDataSetMapping(DataSetMapping): :type kind: str :param database_name: Required. DatabaseName name of the sink data set :type database_name: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str :param table_name: Required. SQL DB table name. @@ -2458,6 +2883,10 @@ class SqlDBTableDataSetMapping(DataSetMapping): 'type': {'readonly': True}, 'kind': {'required': True}, 'database_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, 'sql_server_resource_id': {'required': True}, 'table_name': {'required': True}, } @@ -2470,22 +2899,26 @@ class SqlDBTableDataSetMapping(DataSetMapping): 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } - def __init__(self, *, database_name: str, sql_server_resource_id: str, table_name: str, data_set_id: str=None, data_set_mapping_status=None, **kwargs) -> None: + def __init__(self, *, database_name: str, data_set_id: str, schema_name: str, sql_server_resource_id: str, table_name: str, **kwargs) -> None: super(SqlDBTableDataSetMapping, self).__init__(**kwargs) self.database_name = database_name self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None + self.provisioning_state = None + self.schema_name = schema_name self.sql_server_resource_id = sql_server_resource_id self.table_name = table_name self.kind = 'SqlDBTable' class SqlDWTableDataSet(DataSet): - """A SQL DW table dataset. + """A SQL DW table data set. Variables are only populated by the server, and will be ignored when sending a request. @@ -2502,11 +2935,14 @@ class SqlDWTableDataSet(DataSet): :type kind: str :ivar data_set_id: Unique id for identifying a data set resource :vartype data_set_id: str - :param data_warehouse_name: DataWarehouse name of the source data set + :param data_warehouse_name: Required. DataWarehouse name of the source + data set :type data_warehouse_name: str - :param sql_server_resource_id: Resource id of SQL server + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str - :param table_name: SQL DW table name. + :param table_name: Required. SQL DW table name. :type table_name: str """ @@ -2516,6 +2952,10 @@ class SqlDWTableDataSet(DataSet): 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, + 'data_warehouse_name': {'required': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, } _attribute_map = { @@ -2525,21 +2965,23 @@ class SqlDWTableDataSet(DataSet): 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } - def __init__(self, *, data_warehouse_name: str=None, sql_server_resource_id: str=None, table_name: str=None, **kwargs) -> None: + def __init__(self, *, data_warehouse_name: str, schema_name: str, sql_server_resource_id: str, table_name: str, **kwargs) -> None: super(SqlDWTableDataSet, self).__init__(**kwargs) self.data_set_id = None self.data_warehouse_name = data_warehouse_name + self.schema_name = schema_name self.sql_server_resource_id = sql_server_resource_id self.table_name = table_name self.kind = 'SqlDWTable' class SqlDWTableDataSetMapping(DataSetMapping): - """A SQL DW Table dataset mapping. + """A SQL DW Table data set mapping. Variables are only populated by the server, and will be ignored when sending a request. @@ -2554,15 +2996,22 @@ class SqlDWTableDataSetMapping(DataSetMapping): :vartype type: str :param kind: Required. Constant filled by server. :type kind: str - :param data_set_id: Gets the id of source dataset. + :param data_set_id: Required. The id of the source data set. :type data_set_id: str - :param data_set_mapping_status: Gets the status of the dataset mapping. + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values include: 'Ok', 'Broken' - :type data_set_mapping_status: str or + :vartype data_set_mapping_status: str or ~azure.mgmt.datashare.models.DataSetMappingStatus :param data_warehouse_name: Required. DataWarehouse name of the source data set :type data_warehouse_name: str + :ivar provisioning_state: Provisioning state of the data set mapping. + Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Moving', + 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.datashare.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str :param sql_server_resource_id: Required. Resource id of SQL server :type sql_server_resource_id: str :param table_name: Required. SQL DW table name. @@ -2574,7 +3023,11 @@ class SqlDWTableDataSetMapping(DataSetMapping): 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, 'data_warehouse_name': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, 'sql_server_resource_id': {'required': True}, 'table_name': {'required': True}, } @@ -2587,60 +3040,64 @@ class SqlDWTableDataSetMapping(DataSetMapping): 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, 'table_name': {'key': 'properties.tableName', 'type': 'str'}, } - def __init__(self, *, data_warehouse_name: str, sql_server_resource_id: str, table_name: str, data_set_id: str=None, data_set_mapping_status=None, **kwargs) -> None: + def __init__(self, *, data_set_id: str, data_warehouse_name: str, schema_name: str, sql_server_resource_id: str, table_name: str, **kwargs) -> None: super(SqlDWTableDataSetMapping, self).__init__(**kwargs) self.data_set_id = data_set_id - self.data_set_mapping_status = data_set_mapping_status + self.data_set_mapping_status = None self.data_warehouse_name = data_warehouse_name + self.provisioning_state = None + self.schema_name = schema_name self.sql_server_resource_id = sql_server_resource_id self.table_name = table_name self.kind = 'SqlDWTable' class SynchronizationDetails(Model): - """Synchronization details at dataset level. + """Synchronization details at data set level. Variables are only populated by the server, and will be ignored when sending a request. - :ivar data_set_id: id of dataSet + :ivar data_set_id: Id of data set :vartype data_set_id: str - :ivar data_set_type: type of DataSet. Possible values include: 'Blob', - 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', - 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'SqlDBTable', - 'SqlDWTable' + :ivar data_set_type: Type of the data set. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType - :ivar duration_ms: duration of dataset level copy + :ivar duration_ms: Duration of data set level copy :vartype duration_ms: int - :ivar end_time: End time of dataset level copy + :ivar end_time: End time of data set level copy :vartype end_time: datetime - :ivar files_read: The number of files read from the source dataset. + :ivar files_read: The number of files read from the source data set :vartype files_read: long - :ivar files_written: The number of files written into the sink dataset. + :ivar files_written: The number of files written into the sink data set :vartype files_written: long - :ivar message: Error Message if any + :ivar message: Error message if any :vartype message: str - :ivar name: name of dataSet + :ivar name: Name of the data set :vartype name: str - :ivar rows_copied: The number of files copied into the sink dataset. + :ivar rows_copied: The number of files copied into the sink data set :vartype rows_copied: long - :ivar rows_read: The number of rows read from the source dataset. + :ivar rows_read: The number of rows read from the source data set. :vartype rows_read: long - :ivar size_read: The size of the data read from the source dataset in - bytes. + :ivar size_read: The size of the data read from the source data set in + bytes :vartype size_read: long - :ivar size_written: The size of the data written into the sink dataset in - bytes. + :ivar size_written: The size of the data written into the sink data set in + bytes :vartype size_written: long - :ivar start_time: start time of dataset level copy + :ivar start_time: Start time of data set level copy :vartype start_time: datetime :ivar status: Raw Status :vartype status: str - :ivar v_core: The vCore units consumed for the dataset synchronization. + :ivar v_core: The vCore units consumed for the data set synchronization :vartype v_core: long """ diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py index 25b47dc1b6d7..ade4b8a64811 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py @@ -142,45 +142,45 @@ class ProviderShareSubscriptionPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderShareSubscriptionPaged, self).__init__(*args, **kwargs) -class SourceShareSynchronizationSettingPaged(Paged): +class ShareSubscriptionPaged(Paged): """ - A paging container for iterating over a list of :class:`SourceShareSynchronizationSetting ` object + A paging container for iterating over a list of :class:`ShareSubscription ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'} + 'current_page': {'key': 'value', 'type': '[ShareSubscription]'} } def __init__(self, *args, **kwargs): - super(SourceShareSynchronizationSettingPaged, self).__init__(*args, **kwargs) -class ShareSubscriptionSynchronizationPaged(Paged): + super(ShareSubscriptionPaged, self).__init__(*args, **kwargs) +class SourceShareSynchronizationSettingPaged(Paged): """ - A paging container for iterating over a list of :class:`ShareSubscriptionSynchronization ` object + A paging container for iterating over a list of :class:`SourceShareSynchronizationSetting ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'} + 'current_page': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'} } def __init__(self, *args, **kwargs): - super(ShareSubscriptionSynchronizationPaged, self).__init__(*args, **kwargs) -class ShareSubscriptionPaged(Paged): + super(SourceShareSynchronizationSettingPaged, self).__init__(*args, **kwargs) +class ShareSubscriptionSynchronizationPaged(Paged): """ - A paging container for iterating over a list of :class:`ShareSubscription ` object + A paging container for iterating over a list of :class:`ShareSubscriptionSynchronization ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ShareSubscription]'} + 'current_page': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'} } def __init__(self, *args, **kwargs): - super(ShareSubscriptionPaged, self).__init__(*args, **kwargs) + super(ShareSubscriptionSynchronizationPaged, self).__init__(*args, **kwargs) class ConsumerSourceDataSetPaged(Paged): """ A paging container for iterating over a list of :class:`ConsumerSourceDataSet ` object diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py index 041eeb9f054d..247999b1aad7 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py @@ -26,7 +26,7 @@ class AccountsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py index c0c6d93723e7..babbd197d2b7 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py @@ -24,7 +24,7 @@ class ConsumerInvitationsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py index 2cb4202b633c..e88759d10625 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py @@ -24,7 +24,7 @@ class ConsumerSourceDataSetsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py index bd36b6b4ae08..c8cd5cf2906f 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py @@ -24,7 +24,7 @@ class DataSetMappingsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config @@ -121,8 +121,8 @@ def create( :param share_subscription_name: The name of the share subscription which will hold the data set sink. :type share_subscription_name: str - :param data_set_mapping_name: The Id of the source data set being - mapped. + :param data_set_mapping_name: The name of the data set mapping to be + created. :type data_set_mapping_name: str :param data_set_mapping: Destination data set configuration details. :type data_set_mapping: ~azure.mgmt.datashare.models.DataSetMapping diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py index c2be6f2ce06f..d706a46c1959 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py @@ -11,6 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +26,7 @@ class DataSetsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config @@ -182,30 +184,9 @@ def create( return deserialized create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} - def delete( - self, resource_group_name, account_name, share_name, data_set_name, custom_headers=None, raw=False, **operation_config): - """Delete DataSet in a share. - - Delete a DataSet in a share. - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param account_name: The name of the share account. - :type account_name: str - :param share_name: The name of the share. - :type share_name: str - :param data_set_name: The name of the dataSet. - :type data_set_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DataShareErrorException` - """ + def _delete_initial( + self, resource_group_name, account_name, share_name, data_set_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -234,12 +215,61 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: raise models.DataShareErrorException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, account_name, share_name, data_set_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete DataSet in a share. + + Delete a DataSet in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param data_set_name: The name of the dataSet. + :type data_set_name: 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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`DataShareErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + data_set_name=data_set_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} def list_by_share( diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py index ad724a72d10e..19d8707745e6 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py @@ -24,7 +24,7 @@ class InvitationsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py index 6e1c462d5f96..0adc6b8c25e2 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py @@ -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: The api version to use. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py index 974f567e0f9b..e7ee3aec5a69 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py @@ -26,7 +26,7 @@ class ProviderShareSubscriptionsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py index 20d62b7af51b..c78cc7dab0c3 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py @@ -26,7 +26,7 @@ class ShareSubscriptionsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config @@ -106,7 +106,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} def create( - self, resource_group_name, account_name, share_subscription_name, invitation_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, share_subscription_name, invitation_id, source_share_location, custom_headers=None, raw=False, **operation_config): """Create shareSubscription in an account. Create a shareSubscription in an account. @@ -119,6 +119,8 @@ def create( :type share_subscription_name: str :param invitation_id: The invitation id. :type invitation_id: str + :param source_share_location: Source share location. + :type source_share_location: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -130,7 +132,7 @@ def create( :raises: :class:`DataShareErrorException` """ - share_subscription = models.ShareSubscription(invitation_id=invitation_id) + share_subscription = models.ShareSubscription(invitation_id=invitation_id, source_share_location=source_share_location) # Construct URL url = self.create.metadata['url'] @@ -278,6 +280,83 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + def list_by_account( + self, resource_group_name, account_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """List of available share subscriptions under an account. + + List share subscriptions in an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param skip_token: Continuation Token + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ShareSubscription + :rtype: + ~azure.mgmt.datashare.models.ShareSubscriptionPaged[~azure.mgmt.datashare.models.ShareSubscription] + :raises: + :class:`DataShareErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ShareSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'} + def list_source_share_synchronization_settings( self, resource_group_name, account_name, share_subscription_name, skip_token=None, custom_headers=None, raw=False, **operation_config): """Get source share synchronization settings for a shareSubscription. @@ -749,80 +828,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) cancel_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization'} - - def list_by_account( - self, resource_group_name, account_name, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List of available share subscriptions under an account. - - List share subscriptions in an account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param account_name: The name of the share account. - :type account_name: str - :param skip_token: Continuation Token - :type skip_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ShareSubscription - :rtype: - ~azure.mgmt.datashare.models.ShareSubscriptionPaged[~azure.mgmt.datashare.models.ShareSubscription] - :raises: - :class:`DataShareErrorException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_account.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ShareSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'} diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py index dd320f8c8334..4d00b63fb7ad 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py @@ -26,7 +26,7 @@ class SharesOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py index d7ebbb9438d4..403101176fad 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py @@ -26,7 +26,7 @@ class SynchronizationSettingsOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py index 1c0b64e563e0..f9e8118cb828 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py @@ -26,7 +26,7 @@ class TriggersOperations(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. Constant value: "2018-11-01-preview". + :ivar api_version: The api version to use. Constant value: "2019-11-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-11-01-preview" + self.api_version = "2019-11-01" self.config = config diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py index 336c61d76ffd..0e7c4a040cf1 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .event_grid_client import EventGridClient -from .version import VERSION +from ._configuration import EventGridClientConfiguration +from ._event_grid_client import EventGridClient +__all__ = ['EventGridClient', 'EventGridClientConfiguration'] -__all__ = ['EventGridClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_configuration.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_configuration.py new file mode 100644 index 000000000000..89880f0710a7 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_configuration.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest import Configuration + +from .version import VERSION + + +class EventGridClientConfiguration(Configuration): + """Configuration for EventGridClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, credentials): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + base_url = 'https://{topicHostname}' + + super(EventGridClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-eventgrid/{}'.format(VERSION)) + + self.credentials = credentials diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_grid_client.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_grid_client.py new file mode 100644 index 000000000000..4bdb28e399c7 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_grid_client.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import EventGridClientConfiguration +from .operations import EventGridClientOperationsMixin +from msrest.exceptions import HttpOperationError +from . import models + + +class EventGridClient(EventGridClientOperationsMixin, SDKClient): + """EventGrid Client + + :ivar config: Configuration for client. + :vartype config: EventGridClientConfiguration + + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, credentials): + + self.config = EventGridClientConfiguration(credentials) + super(EventGridClient, 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 = '2018-01-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py index 30defc1761ca..44573722e41a 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/__init__.py @@ -10,255 +10,306 @@ # -------------------------------------------------------------------------- try: - from .storage_blob_created_event_data_py3 import StorageBlobCreatedEventData - from .storage_blob_deleted_event_data_py3 import StorageBlobDeletedEventData - from .event_hub_capture_file_created_event_data_py3 import EventHubCaptureFileCreatedEventData - from .resource_write_success_data_py3 import ResourceWriteSuccessData - from .resource_write_failure_data_py3 import ResourceWriteFailureData - from .resource_write_cancel_data_py3 import ResourceWriteCancelData - from .resource_delete_success_data_py3 import ResourceDeleteSuccessData - from .resource_delete_failure_data_py3 import ResourceDeleteFailureData - from .resource_delete_cancel_data_py3 import ResourceDeleteCancelData - from .resource_action_success_data_py3 import ResourceActionSuccessData - from .resource_action_failure_data_py3 import ResourceActionFailureData - from .resource_action_cancel_data_py3 import ResourceActionCancelData - from .event_grid_event_py3 import EventGridEvent - from .subscription_validation_event_data_py3 import SubscriptionValidationEventData - from .subscription_validation_response_py3 import SubscriptionValidationResponse - from .subscription_deleted_event_data_py3 import SubscriptionDeletedEventData - from .iot_hub_device_created_event_data_py3 import IotHubDeviceCreatedEventData - from .iot_hub_device_deleted_event_data_py3 import IotHubDeviceDeletedEventData - from .iot_hub_device_connected_event_data_py3 import IotHubDeviceConnectedEventData - from .iot_hub_device_disconnected_event_data_py3 import IotHubDeviceDisconnectedEventData - from .iot_hub_device_telemetry_event_data_py3 import IotHubDeviceTelemetryEventData - from .device_twin_metadata_py3 import DeviceTwinMetadata - from .device_twin_properties_py3 import DeviceTwinProperties - from .device_twin_info_properties_py3 import DeviceTwinInfoProperties - from .device_twin_info_x509_thumbprint_py3 import DeviceTwinInfoX509Thumbprint - from .device_twin_info_py3 import DeviceTwinInfo - from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties - from .device_connection_state_event_info_py3 import DeviceConnectionStateEventInfo - from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties - from .device_telemetry_event_properties_py3 import DeviceTelemetryEventProperties - from .container_registry_image_pushed_event_data_py3 import ContainerRegistryImagePushedEventData - from .container_registry_image_deleted_event_data_py3 import ContainerRegistryImageDeletedEventData - from .container_registry_chart_pushed_event_data_py3 import ContainerRegistryChartPushedEventData - from .container_registry_chart_deleted_event_data_py3 import ContainerRegistryChartDeletedEventData - from .container_registry_event_target_py3 import ContainerRegistryEventTarget - from .container_registry_event_request_py3 import ContainerRegistryEventRequest - from .container_registry_event_actor_py3 import ContainerRegistryEventActor - from .container_registry_event_source_py3 import ContainerRegistryEventSource - from .container_registry_event_data_py3 import ContainerRegistryEventData - from .container_registry_artifact_event_target_py3 import ContainerRegistryArtifactEventTarget - from .container_registry_artifact_event_data_py3 import ContainerRegistryArtifactEventData - from .service_bus_active_messages_available_with_no_listeners_event_data_py3 import ServiceBusActiveMessagesAvailableWithNoListenersEventData - from .service_bus_deadletter_messages_available_with_no_listeners_event_data_py3 import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData - from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - from .media_job_error_detail_py3 import MediaJobErrorDetail - from .media_job_error_py3 import MediaJobError - from .media_job_output_py3 import MediaJobOutput - from .media_job_output_asset_py3 import MediaJobOutputAsset - from .media_job_output_progress_event_data_py3 import MediaJobOutputProgressEventData - from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - from .media_job_scheduled_event_data_py3 import MediaJobScheduledEventData - from .media_job_processing_event_data_py3 import MediaJobProcessingEventData - from .media_job_canceling_event_data_py3 import MediaJobCancelingEventData - from .media_job_finished_event_data_py3 import MediaJobFinishedEventData - from .media_job_canceled_event_data_py3 import MediaJobCanceledEventData - from .media_job_errored_event_data_py3 import MediaJobErroredEventData - from .media_job_output_canceled_event_data_py3 import MediaJobOutputCanceledEventData - from .media_job_output_canceling_event_data_py3 import MediaJobOutputCancelingEventData - from .media_job_output_errored_event_data_py3 import MediaJobOutputErroredEventData - from .media_job_output_finished_event_data_py3 import MediaJobOutputFinishedEventData - from .media_job_output_processing_event_data_py3 import MediaJobOutputProcessingEventData - from .media_job_output_scheduled_event_data_py3 import MediaJobOutputScheduledEventData - from .media_live_event_encoder_connected_event_data_py3 import MediaLiveEventEncoderConnectedEventData - from .media_live_event_connection_rejected_event_data_py3 import MediaLiveEventConnectionRejectedEventData - from .media_live_event_encoder_disconnected_event_data_py3 import MediaLiveEventEncoderDisconnectedEventData - from .media_live_event_incoming_stream_received_event_data_py3 import MediaLiveEventIncomingStreamReceivedEventData - from .media_live_event_incoming_streams_out_of_sync_event_data_py3 import MediaLiveEventIncomingStreamsOutOfSyncEventData - from .media_live_event_incoming_video_streams_out_of_sync_event_data_py3 import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData - from .media_live_event_incoming_data_chunk_dropped_event_data_py3 import MediaLiveEventIncomingDataChunkDroppedEventData - from .media_live_event_ingest_heartbeat_event_data_py3 import MediaLiveEventIngestHeartbeatEventData - from .media_live_event_track_discontinuity_detected_event_data_py3 import MediaLiveEventTrackDiscontinuityDetectedEventData - from .maps_geofence_entered_event_data_py3 import MapsGeofenceEnteredEventData - from .maps_geofence_exited_event_data_py3 import MapsGeofenceExitedEventData - from .maps_geofence_result_event_data_py3 import MapsGeofenceResultEventData - from .maps_geofence_geometry_py3 import MapsGeofenceGeometry - from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - from .app_configuration_key_value_modified_event_data_py3 import AppConfigurationKeyValueModifiedEventData - from .app_configuration_key_value_deleted_event_data_py3 import AppConfigurationKeyValueDeletedEventData - from .signal_rservice_client_connection_connected_event_data_py3 import SignalRServiceClientConnectionConnectedEventData - from .signal_rservice_client_connection_disconnected_event_data_py3 import SignalRServiceClientConnectionDisconnectedEventData + from ._models_py3 import AppConfigurationKeyValueDeletedEventData + from ._models_py3 import AppConfigurationKeyValueModifiedEventData + from ._models_py3 import ContainerRegistryArtifactEventData + from ._models_py3 import ContainerRegistryArtifactEventTarget + from ._models_py3 import ContainerRegistryChartDeletedEventData + from ._models_py3 import ContainerRegistryChartPushedEventData + from ._models_py3 import ContainerRegistryEventActor + from ._models_py3 import ContainerRegistryEventData + from ._models_py3 import ContainerRegistryEventRequest + from ._models_py3 import ContainerRegistryEventSource + from ._models_py3 import ContainerRegistryEventTarget + from ._models_py3 import ContainerRegistryImageDeletedEventData + from ._models_py3 import ContainerRegistryImagePushedEventData + from ._models_py3 import DeviceConnectionStateEventInfo + from ._models_py3 import DeviceConnectionStateEventProperties + from ._models_py3 import DeviceLifeCycleEventProperties + from ._models_py3 import DeviceTelemetryEventProperties + from ._models_py3 import DeviceTwinInfo + from ._models_py3 import DeviceTwinInfoProperties + from ._models_py3 import DeviceTwinInfoX509Thumbprint + from ._models_py3 import DeviceTwinMetadata + from ._models_py3 import DeviceTwinProperties + from ._models_py3 import EventGridEvent + from ._models_py3 import EventHubCaptureFileCreatedEventData + from ._models_py3 import IotHubDeviceConnectedEventData + from ._models_py3 import IotHubDeviceCreatedEventData + from ._models_py3 import IotHubDeviceDeletedEventData + from ._models_py3 import IotHubDeviceDisconnectedEventData + from ._models_py3 import IotHubDeviceTelemetryEventData + from ._models_py3 import KeyVaultCertificateExpiredEventData + from ._models_py3 import KeyVaultCertificateNearExpiryEventData + from ._models_py3 import KeyVaultCertificateNewVersionCreatedEventData + from ._models_py3 import KeyVaultKeyExpiredEventData + from ._models_py3 import KeyVaultKeyNearExpiryEventData + from ._models_py3 import KeyVaultKeyNewVersionCreatedEventData + from ._models_py3 import KeyVaultSecretExpiredEventData + from ._models_py3 import KeyVaultSecretNearExpiryEventData + from ._models_py3 import KeyVaultSecretNewVersionCreatedEventData + from ._models_py3 import MachineLearningServicesDatasetDriftDetectedEventData + from ._models_py3 import MachineLearningServicesModelDeployedEventData + from ._models_py3 import MachineLearningServicesModelRegisteredEventData + from ._models_py3 import MachineLearningServicesRunCompletedEventData + from ._models_py3 import MapsGeofenceEnteredEventData + from ._models_py3 import MapsGeofenceEventProperties + from ._models_py3 import MapsGeofenceExitedEventData + from ._models_py3 import MapsGeofenceGeometry + from ._models_py3 import MapsGeofenceResultEventData + from ._models_py3 import MediaJobCanceledEventData + from ._models_py3 import MediaJobCancelingEventData + from ._models_py3 import MediaJobError + from ._models_py3 import MediaJobErrorDetail + from ._models_py3 import MediaJobErroredEventData + from ._models_py3 import MediaJobFinishedEventData + from ._models_py3 import MediaJobOutput + from ._models_py3 import MediaJobOutputAsset + from ._models_py3 import MediaJobOutputCanceledEventData + from ._models_py3 import MediaJobOutputCancelingEventData + from ._models_py3 import MediaJobOutputErroredEventData + from ._models_py3 import MediaJobOutputFinishedEventData + from ._models_py3 import MediaJobOutputProcessingEventData + from ._models_py3 import MediaJobOutputProgressEventData + from ._models_py3 import MediaJobOutputScheduledEventData + from ._models_py3 import MediaJobOutputStateChangeEventData + from ._models_py3 import MediaJobProcessingEventData + from ._models_py3 import MediaJobScheduledEventData + from ._models_py3 import MediaJobStateChangeEventData + from ._models_py3 import MediaLiveEventConnectionRejectedEventData + from ._models_py3 import MediaLiveEventEncoderConnectedEventData + from ._models_py3 import MediaLiveEventEncoderDisconnectedEventData + from ._models_py3 import MediaLiveEventIncomingDataChunkDroppedEventData + from ._models_py3 import MediaLiveEventIncomingStreamReceivedEventData + from ._models_py3 import MediaLiveEventIncomingStreamsOutOfSyncEventData + from ._models_py3 import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData + from ._models_py3 import MediaLiveEventIngestHeartbeatEventData + from ._models_py3 import MediaLiveEventTrackDiscontinuityDetectedEventData + from ._models_py3 import ResourceActionCancelData + from ._models_py3 import ResourceActionFailureData + from ._models_py3 import ResourceActionSuccessData + from ._models_py3 import ResourceDeleteCancelData + from ._models_py3 import ResourceDeleteFailureData + from ._models_py3 import ResourceDeleteSuccessData + from ._models_py3 import ResourceWriteCancelData + from ._models_py3 import ResourceWriteFailureData + from ._models_py3 import ResourceWriteSuccessData + from ._models_py3 import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from ._models_py3 import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from ._models_py3 import SignalRServiceClientConnectionConnectedEventData + from ._models_py3 import SignalRServiceClientConnectionDisconnectedEventData + from ._models_py3 import StorageBlobCreatedEventData + from ._models_py3 import StorageBlobDeletedEventData + from ._models_py3 import StorageBlobRenamedEventData + from ._models_py3 import StorageDirectoryCreatedEventData + from ._models_py3 import StorageDirectoryDeletedEventData + from ._models_py3 import StorageDirectoryRenamedEventData + from ._models_py3 import SubscriptionDeletedEventData + from ._models_py3 import SubscriptionValidationEventData + from ._models_py3 import SubscriptionValidationResponse except (SyntaxError, ImportError): - from .storage_blob_created_event_data import StorageBlobCreatedEventData - from .storage_blob_deleted_event_data import StorageBlobDeletedEventData - from .event_hub_capture_file_created_event_data import EventHubCaptureFileCreatedEventData - from .resource_write_success_data import ResourceWriteSuccessData - from .resource_write_failure_data import ResourceWriteFailureData - from .resource_write_cancel_data import ResourceWriteCancelData - from .resource_delete_success_data import ResourceDeleteSuccessData - from .resource_delete_failure_data import ResourceDeleteFailureData - from .resource_delete_cancel_data import ResourceDeleteCancelData - from .resource_action_success_data import ResourceActionSuccessData - from .resource_action_failure_data import ResourceActionFailureData - from .resource_action_cancel_data import ResourceActionCancelData - from .event_grid_event import EventGridEvent - from .subscription_validation_event_data import SubscriptionValidationEventData - from .subscription_validation_response import SubscriptionValidationResponse - from .subscription_deleted_event_data import SubscriptionDeletedEventData - from .iot_hub_device_created_event_data import IotHubDeviceCreatedEventData - from .iot_hub_device_deleted_event_data import IotHubDeviceDeletedEventData - from .iot_hub_device_connected_event_data import IotHubDeviceConnectedEventData - from .iot_hub_device_disconnected_event_data import IotHubDeviceDisconnectedEventData - from .iot_hub_device_telemetry_event_data import IotHubDeviceTelemetryEventData - from .device_twin_metadata import DeviceTwinMetadata - from .device_twin_properties import DeviceTwinProperties - from .device_twin_info_properties import DeviceTwinInfoProperties - from .device_twin_info_x509_thumbprint import DeviceTwinInfoX509Thumbprint - from .device_twin_info import DeviceTwinInfo - from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties - from .device_connection_state_event_info import DeviceConnectionStateEventInfo - from .device_connection_state_event_properties import DeviceConnectionStateEventProperties - from .device_telemetry_event_properties import DeviceTelemetryEventProperties - from .container_registry_image_pushed_event_data import ContainerRegistryImagePushedEventData - from .container_registry_image_deleted_event_data import ContainerRegistryImageDeletedEventData - from .container_registry_chart_pushed_event_data import ContainerRegistryChartPushedEventData - from .container_registry_chart_deleted_event_data import ContainerRegistryChartDeletedEventData - from .container_registry_event_target import ContainerRegistryEventTarget - from .container_registry_event_request import ContainerRegistryEventRequest - from .container_registry_event_actor import ContainerRegistryEventActor - from .container_registry_event_source import ContainerRegistryEventSource - from .container_registry_event_data import ContainerRegistryEventData - from .container_registry_artifact_event_target import ContainerRegistryArtifactEventTarget - from .container_registry_artifact_event_data import ContainerRegistryArtifactEventData - from .service_bus_active_messages_available_with_no_listeners_event_data import ServiceBusActiveMessagesAvailableWithNoListenersEventData - from .service_bus_deadletter_messages_available_with_no_listeners_event_data import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData - from .media_job_state_change_event_data import MediaJobStateChangeEventData - from .media_job_error_detail import MediaJobErrorDetail - from .media_job_error import MediaJobError - from .media_job_output import MediaJobOutput - from .media_job_output_asset import MediaJobOutputAsset - from .media_job_output_progress_event_data import MediaJobOutputProgressEventData - from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - from .media_job_scheduled_event_data import MediaJobScheduledEventData - from .media_job_processing_event_data import MediaJobProcessingEventData - from .media_job_canceling_event_data import MediaJobCancelingEventData - from .media_job_finished_event_data import MediaJobFinishedEventData - from .media_job_canceled_event_data import MediaJobCanceledEventData - from .media_job_errored_event_data import MediaJobErroredEventData - from .media_job_output_canceled_event_data import MediaJobOutputCanceledEventData - from .media_job_output_canceling_event_data import MediaJobOutputCancelingEventData - from .media_job_output_errored_event_data import MediaJobOutputErroredEventData - from .media_job_output_finished_event_data import MediaJobOutputFinishedEventData - from .media_job_output_processing_event_data import MediaJobOutputProcessingEventData - from .media_job_output_scheduled_event_data import MediaJobOutputScheduledEventData - from .media_live_event_encoder_connected_event_data import MediaLiveEventEncoderConnectedEventData - from .media_live_event_connection_rejected_event_data import MediaLiveEventConnectionRejectedEventData - from .media_live_event_encoder_disconnected_event_data import MediaLiveEventEncoderDisconnectedEventData - from .media_live_event_incoming_stream_received_event_data import MediaLiveEventIncomingStreamReceivedEventData - from .media_live_event_incoming_streams_out_of_sync_event_data import MediaLiveEventIncomingStreamsOutOfSyncEventData - from .media_live_event_incoming_video_streams_out_of_sync_event_data import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData - from .media_live_event_incoming_data_chunk_dropped_event_data import MediaLiveEventIncomingDataChunkDroppedEventData - from .media_live_event_ingest_heartbeat_event_data import MediaLiveEventIngestHeartbeatEventData - from .media_live_event_track_discontinuity_detected_event_data import MediaLiveEventTrackDiscontinuityDetectedEventData - from .maps_geofence_entered_event_data import MapsGeofenceEnteredEventData - from .maps_geofence_exited_event_data import MapsGeofenceExitedEventData - from .maps_geofence_result_event_data import MapsGeofenceResultEventData - from .maps_geofence_geometry import MapsGeofenceGeometry - from .maps_geofence_event_properties import MapsGeofenceEventProperties - from .app_configuration_key_value_modified_event_data import AppConfigurationKeyValueModifiedEventData - from .app_configuration_key_value_deleted_event_data import AppConfigurationKeyValueDeletedEventData - from .signal_rservice_client_connection_connected_event_data import SignalRServiceClientConnectionConnectedEventData - from .signal_rservice_client_connection_disconnected_event_data import SignalRServiceClientConnectionDisconnectedEventData -from .event_grid_client_enums import ( - MediaJobState, - MediaJobErrorCode, + from ._models import AppConfigurationKeyValueDeletedEventData + from ._models import AppConfigurationKeyValueModifiedEventData + from ._models import ContainerRegistryArtifactEventData + from ._models import ContainerRegistryArtifactEventTarget + from ._models import ContainerRegistryChartDeletedEventData + from ._models import ContainerRegistryChartPushedEventData + from ._models import ContainerRegistryEventActor + from ._models import ContainerRegistryEventData + from ._models import ContainerRegistryEventRequest + from ._models import ContainerRegistryEventSource + from ._models import ContainerRegistryEventTarget + from ._models import ContainerRegistryImageDeletedEventData + from ._models import ContainerRegistryImagePushedEventData + from ._models import DeviceConnectionStateEventInfo + from ._models import DeviceConnectionStateEventProperties + from ._models import DeviceLifeCycleEventProperties + from ._models import DeviceTelemetryEventProperties + from ._models import DeviceTwinInfo + from ._models import DeviceTwinInfoProperties + from ._models import DeviceTwinInfoX509Thumbprint + from ._models import DeviceTwinMetadata + from ._models import DeviceTwinProperties + from ._models import EventGridEvent + from ._models import EventHubCaptureFileCreatedEventData + from ._models import IotHubDeviceConnectedEventData + from ._models import IotHubDeviceCreatedEventData + from ._models import IotHubDeviceDeletedEventData + from ._models import IotHubDeviceDisconnectedEventData + from ._models import IotHubDeviceTelemetryEventData + from ._models import KeyVaultCertificateExpiredEventData + from ._models import KeyVaultCertificateNearExpiryEventData + from ._models import KeyVaultCertificateNewVersionCreatedEventData + from ._models import KeyVaultKeyExpiredEventData + from ._models import KeyVaultKeyNearExpiryEventData + from ._models import KeyVaultKeyNewVersionCreatedEventData + from ._models import KeyVaultSecretExpiredEventData + from ._models import KeyVaultSecretNearExpiryEventData + from ._models import KeyVaultSecretNewVersionCreatedEventData + from ._models import MachineLearningServicesDatasetDriftDetectedEventData + from ._models import MachineLearningServicesModelDeployedEventData + from ._models import MachineLearningServicesModelRegisteredEventData + from ._models import MachineLearningServicesRunCompletedEventData + from ._models import MapsGeofenceEnteredEventData + from ._models import MapsGeofenceEventProperties + from ._models import MapsGeofenceExitedEventData + from ._models import MapsGeofenceGeometry + from ._models import MapsGeofenceResultEventData + from ._models import MediaJobCanceledEventData + from ._models import MediaJobCancelingEventData + from ._models import MediaJobError + from ._models import MediaJobErrorDetail + from ._models import MediaJobErroredEventData + from ._models import MediaJobFinishedEventData + from ._models import MediaJobOutput + from ._models import MediaJobOutputAsset + from ._models import MediaJobOutputCanceledEventData + from ._models import MediaJobOutputCancelingEventData + from ._models import MediaJobOutputErroredEventData + from ._models import MediaJobOutputFinishedEventData + from ._models import MediaJobOutputProcessingEventData + from ._models import MediaJobOutputProgressEventData + from ._models import MediaJobOutputScheduledEventData + from ._models import MediaJobOutputStateChangeEventData + from ._models import MediaJobProcessingEventData + from ._models import MediaJobScheduledEventData + from ._models import MediaJobStateChangeEventData + from ._models import MediaLiveEventConnectionRejectedEventData + from ._models import MediaLiveEventEncoderConnectedEventData + from ._models import MediaLiveEventEncoderDisconnectedEventData + from ._models import MediaLiveEventIncomingDataChunkDroppedEventData + from ._models import MediaLiveEventIncomingStreamReceivedEventData + from ._models import MediaLiveEventIncomingStreamsOutOfSyncEventData + from ._models import MediaLiveEventIncomingVideoStreamsOutOfSyncEventData + from ._models import MediaLiveEventIngestHeartbeatEventData + from ._models import MediaLiveEventTrackDiscontinuityDetectedEventData + from ._models import ResourceActionCancelData + from ._models import ResourceActionFailureData + from ._models import ResourceActionSuccessData + from ._models import ResourceDeleteCancelData + from ._models import ResourceDeleteFailureData + from ._models import ResourceDeleteSuccessData + from ._models import ResourceWriteCancelData + from ._models import ResourceWriteFailureData + from ._models import ResourceWriteSuccessData + from ._models import ServiceBusActiveMessagesAvailableWithNoListenersEventData + from ._models import ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + from ._models import SignalRServiceClientConnectionConnectedEventData + from ._models import SignalRServiceClientConnectionDisconnectedEventData + from ._models import StorageBlobCreatedEventData + from ._models import StorageBlobDeletedEventData + from ._models import StorageBlobRenamedEventData + from ._models import StorageDirectoryCreatedEventData + from ._models import StorageDirectoryDeletedEventData + from ._models import StorageDirectoryRenamedEventData + from ._models import SubscriptionDeletedEventData + from ._models import SubscriptionValidationEventData + from ._models import SubscriptionValidationResponse +from ._event_grid_client_enums import ( MediaJobErrorCategory, + MediaJobErrorCode, MediaJobRetry, + MediaJobState, ) __all__ = [ - 'StorageBlobCreatedEventData', - 'StorageBlobDeletedEventData', - 'EventHubCaptureFileCreatedEventData', - 'ResourceWriteSuccessData', - 'ResourceWriteFailureData', - 'ResourceWriteCancelData', - 'ResourceDeleteSuccessData', - 'ResourceDeleteFailureData', - 'ResourceDeleteCancelData', - 'ResourceActionSuccessData', - 'ResourceActionFailureData', - 'ResourceActionCancelData', + 'AppConfigurationKeyValueDeletedEventData', + 'AppConfigurationKeyValueModifiedEventData', + 'ContainerRegistryArtifactEventData', + 'ContainerRegistryArtifactEventTarget', + 'ContainerRegistryChartDeletedEventData', + 'ContainerRegistryChartPushedEventData', + 'ContainerRegistryEventActor', + 'ContainerRegistryEventData', + 'ContainerRegistryEventRequest', + 'ContainerRegistryEventSource', + 'ContainerRegistryEventTarget', + 'ContainerRegistryImageDeletedEventData', + 'ContainerRegistryImagePushedEventData', + 'DeviceConnectionStateEventInfo', + 'DeviceConnectionStateEventProperties', + 'DeviceLifeCycleEventProperties', + 'DeviceTelemetryEventProperties', + 'DeviceTwinInfo', + 'DeviceTwinInfoProperties', + 'DeviceTwinInfoX509Thumbprint', + 'DeviceTwinMetadata', + 'DeviceTwinProperties', 'EventGridEvent', - 'SubscriptionValidationEventData', - 'SubscriptionValidationResponse', - 'SubscriptionDeletedEventData', + 'EventHubCaptureFileCreatedEventData', + 'IotHubDeviceConnectedEventData', 'IotHubDeviceCreatedEventData', 'IotHubDeviceDeletedEventData', - 'IotHubDeviceConnectedEventData', 'IotHubDeviceDisconnectedEventData', 'IotHubDeviceTelemetryEventData', - 'DeviceTwinMetadata', - 'DeviceTwinProperties', - 'DeviceTwinInfoProperties', - 'DeviceTwinInfoX509Thumbprint', - 'DeviceTwinInfo', - 'DeviceLifeCycleEventProperties', - 'DeviceConnectionStateEventInfo', - 'DeviceConnectionStateEventProperties', - 'DeviceTelemetryEventProperties', - 'ContainerRegistryImagePushedEventData', - 'ContainerRegistryImageDeletedEventData', - 'ContainerRegistryChartPushedEventData', - 'ContainerRegistryChartDeletedEventData', - 'ContainerRegistryEventTarget', - 'ContainerRegistryEventRequest', - 'ContainerRegistryEventActor', - 'ContainerRegistryEventSource', - 'ContainerRegistryEventData', - 'ContainerRegistryArtifactEventTarget', - 'ContainerRegistryArtifactEventData', - 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', - 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', - 'MediaJobStateChangeEventData', - 'MediaJobErrorDetail', + 'KeyVaultCertificateExpiredEventData', + 'KeyVaultCertificateNearExpiryEventData', + 'KeyVaultCertificateNewVersionCreatedEventData', + 'KeyVaultKeyExpiredEventData', + 'KeyVaultKeyNearExpiryEventData', + 'KeyVaultKeyNewVersionCreatedEventData', + 'KeyVaultSecretExpiredEventData', + 'KeyVaultSecretNearExpiryEventData', + 'KeyVaultSecretNewVersionCreatedEventData', + 'MachineLearningServicesDatasetDriftDetectedEventData', + 'MachineLearningServicesModelDeployedEventData', + 'MachineLearningServicesModelRegisteredEventData', + 'MachineLearningServicesRunCompletedEventData', + 'MapsGeofenceEnteredEventData', + 'MapsGeofenceEventProperties', + 'MapsGeofenceExitedEventData', + 'MapsGeofenceGeometry', + 'MapsGeofenceResultEventData', + 'MediaJobCanceledEventData', + 'MediaJobCancelingEventData', 'MediaJobError', + 'MediaJobErrorDetail', + 'MediaJobErroredEventData', + 'MediaJobFinishedEventData', 'MediaJobOutput', 'MediaJobOutputAsset', - 'MediaJobOutputProgressEventData', - 'MediaJobOutputStateChangeEventData', - 'MediaJobScheduledEventData', - 'MediaJobProcessingEventData', - 'MediaJobCancelingEventData', - 'MediaJobFinishedEventData', - 'MediaJobCanceledEventData', - 'MediaJobErroredEventData', 'MediaJobOutputCanceledEventData', 'MediaJobOutputCancelingEventData', 'MediaJobOutputErroredEventData', 'MediaJobOutputFinishedEventData', 'MediaJobOutputProcessingEventData', + 'MediaJobOutputProgressEventData', 'MediaJobOutputScheduledEventData', - 'MediaLiveEventEncoderConnectedEventData', + 'MediaJobOutputStateChangeEventData', + 'MediaJobProcessingEventData', + 'MediaJobScheduledEventData', + 'MediaJobStateChangeEventData', 'MediaLiveEventConnectionRejectedEventData', + 'MediaLiveEventEncoderConnectedEventData', 'MediaLiveEventEncoderDisconnectedEventData', + 'MediaLiveEventIncomingDataChunkDroppedEventData', 'MediaLiveEventIncomingStreamReceivedEventData', 'MediaLiveEventIncomingStreamsOutOfSyncEventData', 'MediaLiveEventIncomingVideoStreamsOutOfSyncEventData', - 'MediaLiveEventIncomingDataChunkDroppedEventData', 'MediaLiveEventIngestHeartbeatEventData', 'MediaLiveEventTrackDiscontinuityDetectedEventData', - 'MapsGeofenceEnteredEventData', - 'MapsGeofenceExitedEventData', - 'MapsGeofenceResultEventData', - 'MapsGeofenceGeometry', - 'MapsGeofenceEventProperties', - 'AppConfigurationKeyValueModifiedEventData', - 'AppConfigurationKeyValueDeletedEventData', + 'ResourceActionCancelData', + 'ResourceActionFailureData', + 'ResourceActionSuccessData', + 'ResourceDeleteCancelData', + 'ResourceDeleteFailureData', + 'ResourceDeleteSuccessData', + 'ResourceWriteCancelData', + 'ResourceWriteFailureData', + 'ResourceWriteSuccessData', + 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', 'SignalRServiceClientConnectionConnectedEventData', 'SignalRServiceClientConnectionDisconnectedEventData', + 'StorageBlobCreatedEventData', + 'StorageBlobDeletedEventData', + 'StorageBlobRenamedEventData', + 'StorageDirectoryCreatedEventData', + 'StorageDirectoryDeletedEventData', + 'StorageDirectoryRenamedEventData', + 'SubscriptionDeletedEventData', + 'SubscriptionValidationEventData', + 'SubscriptionValidationResponse', 'MediaJobState', 'MediaJobErrorCode', 'MediaJobErrorCategory', diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_event_grid_client_enums.py similarity index 100% rename from sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py rename to sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_event_grid_client_enums.py diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models.py new file mode 100644 index 000000000000..6b5edfff0fc4 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models.py @@ -0,0 +1,3843 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AppConfigurationKeyValueDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.AppConfiguration.KeyValueDeleted event. + + :param key: The key used to identify the key-value that was deleted. + :type key: str + :param label: The label, if any, used to identify the key-value that was + deleted. + :type label: str + :param etag: The etag representing the key-value that was deleted. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.label = kwargs.get('label', None) + self.etag = kwargs.get('etag', None) + + +class AppConfigurationKeyValueModifiedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.AppConfiguration.KeyValueModified event. + + :param key: The key used to identify the key-value that was modified. + :type key: str + :param label: The label, if any, used to identify the key-value that was + modified. + :type label: str + :param etag: The etag representing the new state of the key-value. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.label = kwargs.get('label', None) + self.etag = kwargs.get('etag', None) + + +class ContainerRegistryArtifactEventData(Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.timestamp = kwargs.get('timestamp', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + + +class ContainerRegistryArtifactEventTarget(Model): + """The target of the event. + + :param media_type: The MIME type of the artifact. + :type media_type: str + :param size: The size in bytes of the artifact. + :type size: long + :param digest: The digest of the artifact. + :type digest: str + :param repository: The repository name of the artifact. + :type repository: str + :param tag: The tag of the artifact. + :type tag: str + :param name: The name of the artifact. + :type name: str + :param version: The version of the artifact. + :type version: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) + self.media_type = kwargs.get('media_type', None) + self.size = kwargs.get('size', None) + self.digest = kwargs.get('digest', None) + self.repository = kwargs.get('repository', None) + self.tag = kwargs.get('tag', None) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + + +class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ChartDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryChartDeletedEventData, self).__init__(**kwargs) + + +class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ChartPushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryChartPushedEventData, self).__init__(**kwargs) + + +class ContainerRegistryEventActor(Model): + """The agent that initiated the event. For most situations, this could be from + the authorization context of the request. + + :param name: The subject or username associated with the request context + that generated the event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryEventActor, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class ContainerRegistryEventData(Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.eventgrid.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.timestamp = kwargs.get('timestamp', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + self.request = kwargs.get('request', None) + self.actor = kwargs.get('actor', None) + self.source = kwargs.get('source', None) + + +class ContainerRegistryEventRequest(Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection + that initiated the event. This is the RemoteAddr from the standard http + request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, + as specified by the http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryEventRequest, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.addr = kwargs.get('addr', None) + self.host = kwargs.get('host', None) + self.method = kwargs.get('method', None) + self.useragent = kwargs.get('useragent', None) + + +class ContainerRegistryEventSource(Model): + """The registry node that generated the event. Put differently, while the + actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that + generated the event. Generally, this will be resolved by os.Hostname() + along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after + each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryEventSource, self).__init__(**kwargs) + self.addr = kwargs.get('addr', None) + self.instance_id = kwargs.get('instance_id', None) + + +class ContainerRegistryEventTarget(Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 + HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryEventTarget, self).__init__(**kwargs) + self.media_type = kwargs.get('media_type', None) + self.size = kwargs.get('size', None) + self.digest = kwargs.get('digest', None) + self.length = kwargs.get('length', None) + self.repository = kwargs.get('repository', None) + self.url = kwargs.get('url', None) + self.tag = kwargs.get('tag', None) + + +class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ImageDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.eventgrid.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryImageDeletedEventData, self).__init__(**kwargs) + + +class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ImagePushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.eventgrid.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryImagePushedEventData, self).__init__(**kwargs) + + +class DeviceConnectionStateEventInfo(Model): + """Information about the device connection state event. + + :param sequence_number: Sequence number is string representation of a + hexadecimal number. string compare can be used to identify the larger + number because both in ASCII and HEX numbers come after alphabets. If you + are converting the string to hex, then the number is a 256 bit number. + :type sequence_number: str + """ + + _attribute_map = { + 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) + self.sequence_number = kwargs.get('sequence_number', None) + + +class DeviceConnectionStateEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device connection + state event (DeviceConnected, DeviceDisconnected). + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, **kwargs): + super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.module_id = kwargs.get('module_id', None) + self.hub_name = kwargs.get('hub_name', None) + self.device_connection_state_event_info = kwargs.get('device_connection_state_event_info', None) + + +class DeviceLifeCycleEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device life cycle + event (DeviceCreated, DeviceDeleted). + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud + representation of application device metadata. + :type twin: ~azure.eventgrid.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__(self, **kwargs): + super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.hub_name = kwargs.get('hub_name', None) + self.twin = kwargs.get('twin', None) + + +class DeviceTelemetryEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device telemetry + event (DeviceTelemetry). + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that + can be added to the message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(DeviceTelemetryEventProperties, self).__init__(**kwargs) + self.body = kwargs.get('body', None) + self.properties = kwargs.get('properties', None) + self.system_properties = kwargs.get('system_properties', None) + + +class DeviceTwinInfo(Model): + """Information about the device twin, which is the cloud representation of + application device metadata. + + :param authentication_type: Authentication type used for this device: + either SAS, SelfSigned, or CertificateAuthority. + :type authentication_type: str + :param cloud_to_device_message_count: Count of cloud to device messages + sent to this device. + :type cloud_to_device_message_count: float + :param connection_state: Whether the device is connected or disconnected. + :type connection_state: str + :param device_id: The unique identifier of the device twin. + :type device_id: str + :param etag: A piece of information that describes the content of the + device twin. Each etag is guaranteed to be unique per device twin. + :type etag: str + :param last_activity_time: The ISO8601 timestamp of the last activity. + :type last_activity_time: str + :param properties: Properties JSON element. + :type properties: ~azure.eventgrid.models.DeviceTwinInfoProperties + :param status: Whether the device twin is enabled or disabled. + :type status: str + :param status_update_time: The ISO8601 timestamp of the last device twin + status update. + :type status_update_time: str + :param version: An integer that is incremented by one each time the device + twin is updated. + :type version: float + :param x509_thumbprint: The thumbprint is a unique value for the x509 + certificate, commonly used to find a particular certificate in a + certificate store. The thumbprint is dynamically generated using the SHA1 + algorithm, and does not physically exist in the certificate. + :type x509_thumbprint: + ~azure.eventgrid.models.DeviceTwinInfoX509Thumbprint + """ + + _attribute_map = { + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'float'}, + 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, + } + + def __init__(self, **kwargs): + super(DeviceTwinInfo, self).__init__(**kwargs) + self.authentication_type = kwargs.get('authentication_type', None) + self.cloud_to_device_message_count = kwargs.get('cloud_to_device_message_count', None) + self.connection_state = kwargs.get('connection_state', None) + self.device_id = kwargs.get('device_id', None) + self.etag = kwargs.get('etag', None) + self.last_activity_time = kwargs.get('last_activity_time', None) + self.properties = kwargs.get('properties', None) + self.status = kwargs.get('status', None) + self.status_update_time = kwargs.get('status_update_time', None) + self.version = kwargs.get('version', None) + self.x509_thumbprint = kwargs.get('x509_thumbprint', None) + + +class DeviceTwinInfoProperties(Model): + """Properties JSON element. + + :param desired: A portion of the properties that can be written only by + the application back-end, and read by the device. + :type desired: ~azure.eventgrid.models.DeviceTwinProperties + :param reported: A portion of the properties that can be written only by + the device, and read by the application back-end. + :type reported: ~azure.eventgrid.models.DeviceTwinProperties + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, + 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, + } + + def __init__(self, **kwargs): + super(DeviceTwinInfoProperties, self).__init__(**kwargs) + self.desired = kwargs.get('desired', None) + self.reported = kwargs.get('reported', None) + + +class DeviceTwinInfoX509Thumbprint(Model): + """The thumbprint is a unique value for the x509 certificate, commonly used to + find a particular certificate in a certificate store. The thumbprint is + dynamically generated using the SHA1 algorithm, and does not physically + exist in the certificate. + + :param primary_thumbprint: Primary thumbprint for the x509 certificate. + :type primary_thumbprint: str + :param secondary_thumbprint: Secondary thumbprint for the x509 + certificate. + :type secondary_thumbprint: str + """ + + _attribute_map = { + 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, + 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) + self.primary_thumbprint = kwargs.get('primary_thumbprint', None) + self.secondary_thumbprint = kwargs.get('secondary_thumbprint', None) + + +class DeviceTwinMetadata(Model): + """Metadata information for the properties JSON document. + + :param last_updated: The ISO8601 timestamp of the last time the properties + were updated. + :type last_updated: str + """ + + _attribute_map = { + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeviceTwinMetadata, self).__init__(**kwargs) + self.last_updated = kwargs.get('last_updated', None) + + +class DeviceTwinProperties(Model): + """A portion of the properties that can be written only by the application + back-end, and read by the device. + + :param metadata: Metadata information for the properties JSON document. + :type metadata: ~azure.eventgrid.models.DeviceTwinMetadata + :param version: Version of device twin properties. + :type version: float + """ + + _attribute_map = { + 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, + 'version': {'key': 'version', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(DeviceTwinProperties, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.version = kwargs.get('version', None) + + +class EventGridEvent(Model): + """Properties of an event published to an Event Grid topic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. An unique identifier for the event. + :type id: str + :param topic: The resource path of the event source. + :type topic: str + :param subject: Required. A resource path relative to the topic path. + :type subject: str + :param data: Required. Event data specific to the event type. + :type data: object + :param event_type: Required. The type of the event that occurred. + :type event_type: str + :param event_time: Required. The time (in UTC) the event was generated. + :type event_time: datetime + :ivar metadata_version: The schema version of the event metadata. + :vartype metadata_version: str + :param data_version: Required. The schema version of the data object. + :type data_version: str + """ + + _validation = { + 'id': {'required': True}, + 'subject': {'required': True}, + 'data': {'required': True}, + 'event_type': {'required': True}, + 'event_time': {'required': True}, + 'metadata_version': {'readonly': True}, + 'data_version': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'object'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, + 'data_version': {'key': 'dataVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventGridEvent, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.topic = kwargs.get('topic', None) + self.subject = kwargs.get('subject', None) + self.data = kwargs.get('data', None) + self.event_type = kwargs.get('event_type', None) + self.event_time = kwargs.get('event_time', None) + self.metadata_version = None + self.data_version = kwargs.get('data_version', None) + + +class EventHubCaptureFileCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.EventHub.CaptureFileCreated event. + + :param fileurl: The path to the capture file. + :type fileurl: str + :param file_type: The file type of the capture file. + :type file_type: str + :param partition_id: The shard ID. + :type partition_id: str + :param size_in_bytes: The file size. + :type size_in_bytes: int + :param event_count: The number of events in the file. + :type event_count: int + :param first_sequence_number: The smallest sequence number from the queue. + :type first_sequence_number: int + :param last_sequence_number: The last sequence number from the queue. + :type last_sequence_number: int + :param first_enqueue_time: The first time from the queue. + :type first_enqueue_time: datetime + :param last_enqueue_time: The last time from the queue. + :type last_enqueue_time: datetime + """ + + _attribute_map = { + 'fileurl': {'key': 'fileurl', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, + 'event_count': {'key': 'eventCount', 'type': 'int'}, + 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, + 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, + 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, + 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) + self.fileurl = kwargs.get('fileurl', None) + self.file_type = kwargs.get('file_type', None) + self.partition_id = kwargs.get('partition_id', None) + self.size_in_bytes = kwargs.get('size_in_bytes', None) + self.event_count = kwargs.get('event_count', None) + self.first_sequence_number = kwargs.get('first_sequence_number', None) + self.last_sequence_number = kwargs.get('last_sequence_number', None) + self.first_enqueue_time = kwargs.get('first_enqueue_time', None) + self.last_enqueue_time = kwargs.get('last_enqueue_time', None) + + +class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceConnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceConnectedEventData, self).__init__(**kwargs) + + +class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceCreated event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud + representation of application device metadata. + :type twin: ~azure.eventgrid.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceCreatedEventData, self).__init__(**kwargs) + + +class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceDeleted event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud + representation of application device metadata. + :type twin: ~azure.eventgrid.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceDeletedEventData, self).__init__(**kwargs) + + +class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceDisconnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceDisconnectedEventData, self).__init__(**kwargs) + + +class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): + """Event data for Microsoft.Devices.DeviceTelemetry event. + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that + can be added to the message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(IotHubDeviceTelemetryEventData, self).__init__(**kwargs) + + +class KeyVaultCertificateExpiredEventData(Model): + """Schema of the Data property of an EventGridEvent for an CertificateExpired + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultCertificateExpiredEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultCertificateNearExpiryEventData(Model): + """Schema of the Data property of an EventGridEvent for an + CertificateNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultCertificateNearExpiryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultCertificateNewVersionCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + CertificateNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultCertificateNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultKeyExpiredEventData(Model): + """Schema of the Data property of an EventGridEvent for an KeyExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyExpiredEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultKeyNearExpiryEventData(Model): + """Schema of the Data property of an EventGridEvent for an KeyNearExpiry + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyNearExpiryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultKeyNewVersionCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + KeyNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultSecretExpiredEventData(Model): + """Schema of the Data property of an EventGridEvent for an SecretExpired + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretExpiredEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultSecretNearExpiryEventData(Model): + """Schema of the Data property of an EventGridEvent for an SecretNearExpiry + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretNearExpiryEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class KeyVaultSecretNewVersionCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + SecretNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(KeyVaultSecretNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.vault_name = kwargs.get('vault_name', None) + self.object_type = kwargs.get('object_type', None) + self.object_name = kwargs.get('object_name', None) + self.version = kwargs.get('version', None) + self.nbf = kwargs.get('nbf', None) + self.exp = kwargs.get('exp', None) + + +class MachineLearningServicesDatasetDriftDetectedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.DatasetDriftDetected event. + + :param data_drift_id: The ID of the data drift monitor that triggered the + event. + :type data_drift_id: str + :param data_drift_name: The name of the data drift monitor that triggered + the event. + :type data_drift_name: str + :param run_id: The ID of the Run that detected data drift. + :type run_id: str + :param base_dataset_id: The ID of the base Dataset used to detect drift. + :type base_dataset_id: str + :param target_dataset_id: The ID of the target Dataset used to detect + drift. + :type target_dataset_id: str + :param drift_coefficient: The coefficient result that triggered the event. + :type drift_coefficient: float + :param start_time: The start time of the target dataset time series that + resulted in drift detection. + :type start_time: datetime + :param end_time: The end time of the target dataset time series that + resulted in drift detection. + :type end_time: datetime + """ + + _attribute_map = { + 'data_drift_id': {'key': 'dataDriftId', 'type': 'str'}, + 'data_drift_name': {'key': 'dataDriftName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'base_dataset_id': {'key': 'baseDatasetId', 'type': 'str'}, + 'target_dataset_id': {'key': 'targetDatasetId', 'type': 'str'}, + 'drift_coefficient': {'key': 'driftCoefficient', 'type': 'float'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(MachineLearningServicesDatasetDriftDetectedEventData, self).__init__(**kwargs) + self.data_drift_id = kwargs.get('data_drift_id', None) + self.data_drift_name = kwargs.get('data_drift_name', None) + self.run_id = kwargs.get('run_id', None) + self.base_dataset_id = kwargs.get('base_dataset_id', None) + self.target_dataset_id = kwargs.get('target_dataset_id', None) + self.drift_coefficient = kwargs.get('drift_coefficient', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class MachineLearningServicesModelDeployedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.ModelDeployed event. + + :param service_name: The name of the deployed service. + :type service_name: str + :param service_compute_type: The compute type (e.g. ACI, AKS) of the + deployed service. + :type service_compute_type: str + :param model_ids: A common separated list of model IDs. The IDs of the + models deployed in the service. + :type model_ids: str + :param service_tags: The tags of the deployed service. + :type service_tags: object + :param service_properties: The properties of the deployed service. + :type service_properties: object + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_compute_type': {'key': 'serviceComputeType', 'type': 'str'}, + 'model_ids': {'key': 'modelIds', 'type': 'str'}, + 'service_tags': {'key': 'serviceTags', 'type': 'object'}, + 'service_properties': {'key': 'serviceProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MachineLearningServicesModelDeployedEventData, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.service_compute_type = kwargs.get('service_compute_type', None) + self.model_ids = kwargs.get('model_ids', None) + self.service_tags = kwargs.get('service_tags', None) + self.service_properties = kwargs.get('service_properties', None) + + +class MachineLearningServicesModelRegisteredEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.ModelRegistered event. + + :param model_name: The name of the model that was registered. + :type model_name: str + :param model_version: The version of the model that was registered. + :type model_version: int + :param model_tags: The tags of the model that was registered. + :type model_tags: object + :param model_properties: The properties of the model that was registered. + :type model_properties: object + """ + + _attribute_map = { + 'model_name': {'key': 'modelName', 'type': 'str'}, + 'model_version': {'key': 'modelVersion', 'type': 'int'}, + 'model_tags': {'key': 'modelTags', 'type': 'object'}, + 'model_properties': {'key': 'modelProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MachineLearningServicesModelRegisteredEventData, self).__init__(**kwargs) + self.model_name = kwargs.get('model_name', None) + self.model_version = kwargs.get('model_version', None) + self.model_tags = kwargs.get('model_tags', None) + self.model_properties = kwargs.get('model_properties', None) + + +class MachineLearningServicesRunCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.RunCompleted event. + + :param experiment_id: The ID of the experiment that the run belongs to. + :type experiment_id: str + :param experiment_name: The name of the experiment that the run belongs + to. + :type experiment_name: str + :param run_id: The ID of the Run that was completed. + :type run_id: str + :param run_type: The Run Type of the completed Run. + :type run_type: str + :param run_tags: The tags of the completed Run. + :type run_tags: object + :param run_properties: The properties of the completed Run. + :type run_properties: object + """ + + _attribute_map = { + 'experiment_id': {'key': 'experimentId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'run_tags': {'key': 'runTags', 'type': 'object'}, + 'run_properties': {'key': 'runProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(MachineLearningServicesRunCompletedEventData, self).__init__(**kwargs) + self.experiment_id = kwargs.get('experiment_id', None) + self.experiment_name = kwargs.get('experiment_name', None) + self.run_id = kwargs.get('run_id', None) + self.run_type = kwargs.get('run_type', None) + self.run_tags = kwargs.get('run_tags', None) + self.run_properties = kwargs.get('run_properties', None) + + +class MapsGeofenceEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a Geofence event + (GeofenceEntered, GeofenceExited, GeofenceResult). + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MapsGeofenceEventProperties, self).__init__(**kwargs) + self.expired_geofence_geometry_id = kwargs.get('expired_geofence_geometry_id', None) + self.geometries = kwargs.get('geometries', None) + self.invalid_period_geofence_geometry_id = kwargs.get('invalid_period_geofence_geometry_id', None) + self.is_event_published = kwargs.get('is_event_published', None) + + +class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Maps.GeofenceEntered event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MapsGeofenceEnteredEventData, self).__init__(**kwargs) + + +class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Maps.GeofenceExited event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MapsGeofenceExitedEventData, self).__init__(**kwargs) + + +class MapsGeofenceGeometry(Model): + """The geofence geometry. + + :param device_id: ID of the device. + :type device_id: str + :param distance: Distance from the coordinate to the closest border of the + geofence. Positive means the coordinate is outside of the geofence. If the + coordinate is outside of the geofence, but more than the value of + searchBuffer away from the closest geofence border, then the value is 999. + Negative means the coordinate is inside of the geofence. If the coordinate + is inside the polygon, but more than the value of searchBuffer away from + the closest geofencing border,then the value is -999. A value of 999 means + that there is great confidence the coordinate is well outside the + geofence. A value of -999 means that there is great confidence the + coordinate is well within the geofence. + :type distance: float + :param geometry_id: The unique ID for the geofence geometry. + :type geometry_id: str + :param nearest_lat: Latitude of the nearest point of the geometry. + :type nearest_lat: float + :param nearest_lon: Longitude of the nearest point of the geometry. + :type nearest_lon: float + :param ud_id: The unique id returned from user upload service when + uploading a geofence. Will not be included in geofencing post API. + :type ud_id: str + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'distance': {'key': 'distance', 'type': 'float'}, + 'geometry_id': {'key': 'geometryId', 'type': 'str'}, + 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, + 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, + 'ud_id': {'key': 'udId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MapsGeofenceGeometry, self).__init__(**kwargs) + self.device_id = kwargs.get('device_id', None) + self.distance = kwargs.get('distance', None) + self.geometry_id = kwargs.get('geometry_id', None) + self.nearest_lat = kwargs.get('nearest_lat', None) + self.nearest_lon = kwargs.get('nearest_lon', None) + self.ud_id = kwargs.get('ud_id', None) + + +class MapsGeofenceResultEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Maps.GeofenceResult event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MapsGeofenceResultEventData, self).__init__(**kwargs) + + +class MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None + self.correlation_data = kwargs.get('correlation_data', None) + + +class MediaJobCanceledEventData(MediaJobStateChangeEventData): + """Job canceled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~azure.eventgrid.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__(self, **kwargs): + super(MediaJobCanceledEventData, self).__init__(**kwargs) + self.outputs = kwargs.get('outputs', None) + + +class MediaJobCancelingEventData(MediaJobStateChangeEventData): + """Job canceling event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobCancelingEventData, self).__init__(**kwargs) + + +class MediaJobError(Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code describing the error. Possible values include: + 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', + 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', + 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' + :vartype code: str or ~azure.eventgrid.models.MediaJobErrorCode + :ivar message: A human-readable language-dependent representation of the + error. + :vartype message: str + :ivar category: Helps with categorization of errors. Possible values + include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' + :vartype category: str or ~azure.eventgrid.models.MediaJobErrorCategory + :ivar retry: Indicates that it may be possible to retry the Job. If retry + is unsuccessful, please contact Azure support via Azure Portal. Possible + values include: 'DoNotRetry', 'MayRetry' + :vartype retry: str or ~azure.eventgrid.models.MediaJobRetry + :ivar details: An array of details about specific errors that led to this + reported error. + :vartype details: list[~azure.eventgrid.models.MediaJobErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'category': {'readonly': True}, + 'retry': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'MediaJobErrorCode'}, + 'message': {'key': 'message', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'MediaJobErrorCategory'}, + 'retry': {'key': 'retry', 'type': 'MediaJobRetry'}, + 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, + } + + def __init__(self, **kwargs): + super(MediaJobError, self).__init__(**kwargs) + self.code = None + self.message = None + self.category = None + self.retry = None + self.details = None + + +class MediaJobErrorDetail(Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code describing the error detail. + :vartype code: str + :ivar message: A human-readable representation of the error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaJobErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + + +class MediaJobErroredEventData(MediaJobStateChangeEventData): + """Job error state event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~azure.eventgrid.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__(self, **kwargs): + super(MediaJobErroredEventData, self).__init__(**kwargs) + self.outputs = kwargs.get('outputs', None) + + +class MediaJobFinishedEventData(MediaJobStateChangeEventData): + """Job finished event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~azure.eventgrid.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__(self, **kwargs): + super(MediaJobFinishedEventData, self).__init__(**kwargs) + self.outputs = kwargs.get('outputs', None) + + +class MediaJobOutput(Model): + """The event data for a Job output. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaJobOutputAsset + + All required parameters must be populated in order to send to Azure. + + :param error: Gets the Job output error. + :type error: ~azure.eventgrid.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :type state: str or ~azure.eventgrid.models.MediaJobState + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} + } + + def __init__(self, **kwargs): + super(MediaJobOutput, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + self.label = kwargs.get('label', None) + self.progress = kwargs.get('progress', None) + self.state = kwargs.get('state', None) + self.odatatype = None + + +class MediaJobOutputAsset(MediaJobOutput): + """The event data for a Job output asset. + + All required parameters must be populated in order to send to Azure. + + :param error: Gets the Job output error. + :type error: ~azure.eventgrid.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :type state: str or ~azure.eventgrid.models.MediaJobState + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param asset_name: Gets the Job output asset name. + :type asset_name: str + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'asset_name': {'key': 'assetName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputAsset, self).__init__(**kwargs) + self.asset_name = kwargs.get('asset_name', None) + self.odatatype = '#Microsoft.Media.JobOutputAsset' + + +class MediaJobOutputStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobOutputStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.output = kwargs.get('output', None) + self.job_correlation_data = kwargs.get('job_correlation_data', None) + + +class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): + """Job output canceled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputCanceledEventData, self).__init__(**kwargs) + + +class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): + """Job output canceling event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputCancelingEventData, self).__init__(**kwargs) + + +class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): + """Job output error event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputErroredEventData, self).__init__(**kwargs) + + +class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): + """Job output finished event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputFinishedEventData, self).__init__(**kwargs) + + +class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): + """Job output processing event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputProcessingEventData, self).__init__(**kwargs) + + +class MediaJobOutputProgressEventData(Model): + """Job Output Progress Event Data. + + :param label: Gets the Job output label. + :type label: str + :param progress: Gets the Job output progress. + :type progress: long + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _attribute_map = { + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputProgressEventData, self).__init__(**kwargs) + self.label = kwargs.get('label', None) + self.progress = kwargs.get('progress', None) + self.job_correlation_data = kwargs.get('job_correlation_data', None) + + +class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): + """Job output scheduled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobOutputScheduledEventData, self).__init__(**kwargs) + + +class MediaJobProcessingEventData(MediaJobStateChangeEventData): + """Job processing event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobProcessingEventData, self).__init__(**kwargs) + + +class MediaJobScheduledEventData(MediaJobStateChangeEventData): + """Job scheduled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MediaJobScheduledEventData, self).__init__(**kwargs) + + +class MediaLiveEventConnectionRejectedEventData(Model): + """Encoder connection rejected event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventEncoderConnectedEventData(Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + + +class MediaLiveEventEncoderDisconnectedEventData(Model): + """Encoder disconnected event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventIncomingDataChunkDroppedEventData(Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Gets the timestamp of the data chunk dropped. + :vartype timestamp: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar timescale: Gets the timescale of the Timestamp. + :vartype timescale: str + :ivar result_code: Gets the result code for fragment drop operation. + :vartype result_code: str + :ivar track_name: Gets the name of the track for which fragment is + dropped. + :vartype track_name: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'track_type': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'timescale': {'readonly': True}, + 'result_code': {'readonly': True}, + 'track_name': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) + self.timestamp = None + self.track_type = None + self.bitrate = None + self.timescale = None + self.result_code = None + self.track_name = None + + +class MediaLiveEventIncomingStreamReceivedEventData(Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar timestamp: Gets the first timestamp of the data chunk received. + :vartype timestamp: str + :ivar duration: Gets the duration of the first data chunk. + :vartype duration: str + :ivar timescale: Gets the timescale in which timestamp is represented. + :vartype timescale: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.track_type = None + self.track_name = None + self.bitrate = None + self.encoder_ip = None + self.encoder_port = None + self.timestamp = None + self.duration = None + self.timescale = None + + +class MediaLiveEventIncomingStreamsOutOfSyncEventData(Model): + """Incoming streams out of sync event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_last_timestamp: Gets the minimum last timestamp received. + :vartype min_last_timestamp: str + :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with + minimum last timestamp. + :vartype type_of_stream_with_min_last_timestamp: str + :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks + (audio or video). + :vartype max_last_timestamp: str + :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with + maximum last timestamp. + :vartype type_of_stream_with_max_last_timestamp: str + :ivar timescale_of_min_last_timestamp: Gets the timescale in which + "MinLastTimestamp" is represented. + :vartype timescale_of_min_last_timestamp: str + :ivar timescale_of_max_last_timestamp: Gets the timescale in which + "MaxLastTimestamp" is represented. + :vartype timescale_of_max_last_timestamp: str + """ + + _validation = { + 'min_last_timestamp': {'readonly': True}, + 'type_of_stream_with_min_last_timestamp': {'readonly': True}, + 'max_last_timestamp': {'readonly': True}, + 'type_of_stream_with_max_last_timestamp': {'readonly': True}, + 'timescale_of_min_last_timestamp': {'readonly': True}, + 'timescale_of_max_last_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, + 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, + 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, + 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.min_last_timestamp = None + self.type_of_stream_with_min_last_timestamp = None + self.max_last_timestamp = None + self.type_of_stream_with_max_last_timestamp = None + self.timescale_of_min_last_timestamp = None + self.timescale_of_max_last_timestamp = None + + +class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(Model): + """Incoming video stream out of synch event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar first_timestamp: Gets the first timestamp received for one of the + quality levels. + :vartype first_timestamp: str + :ivar first_duration: Gets the duration of the data chunk with first + timestamp. + :vartype first_duration: str + :ivar second_timestamp: Gets the timestamp received for some other quality + levels. + :vartype second_timestamp: str + :ivar second_duration: Gets the duration of the data chunk with second + timestamp. + :vartype second_duration: str + :ivar timescale: Gets the timescale in which both the timestamps and + durations are represented. + :vartype timescale: str + """ + + _validation = { + 'first_timestamp': {'readonly': True}, + 'first_duration': {'readonly': True}, + 'second_timestamp': {'readonly': True}, + 'second_duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'first_duration': {'key': 'firstDuration', 'type': 'str'}, + 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, + 'second_duration': {'key': 'secondDuration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.first_timestamp = None + self.first_duration = None + self.second_timestamp = None + self.second_duration = None + self.timescale = None + + +class MediaLiveEventIngestHeartbeatEventData(Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar incoming_bitrate: Gets the incoming bitrate. + :vartype incoming_bitrate: long + :ivar last_timestamp: Gets the last timestamp. + :vartype last_timestamp: str + :ivar timescale: Gets the timescale of the last timestamp. + :vartype timescale: str + :ivar overlap_count: Gets the fragment Overlap count. + :vartype overlap_count: long + :ivar discontinuity_count: Gets the fragment Discontinuity count. + :vartype discontinuity_count: long + :ivar nonincreasing_count: Gets Non increasing count. + :vartype nonincreasing_count: long + :ivar unexpected_bitrate: Gets a value indicating whether unexpected + bitrate is present or not. + :vartype unexpected_bitrate: bool + :ivar state: Gets the state of the live event. + :vartype state: str + :ivar healthy: Gets a value indicating whether preview is healthy or not. + :vartype healthy: bool + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'incoming_bitrate': {'readonly': True}, + 'last_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'overlap_count': {'readonly': True}, + 'discontinuity_count': {'readonly': True}, + 'nonincreasing_count': {'readonly': True}, + 'unexpected_bitrate': {'readonly': True}, + 'state': {'readonly': True}, + 'healthy': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, + 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, + 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, + 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'healthy': {'key': 'healthy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.incoming_bitrate = None + self.last_timestamp = None + self.timescale = None + self.overlap_count = None + self.discontinuity_count = None + self.nonincreasing_count = None + self.unexpected_bitrate = None + self.state = None + self.healthy = None + + +class MediaLiveEventTrackDiscontinuityDetectedEventData(Model): + """Ingest track discontinuity detected event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate. + :vartype bitrate: long + :ivar previous_timestamp: Gets the timestamp of the previous fragment. + :vartype previous_timestamp: str + :ivar new_timestamp: Gets the timestamp of the current fragment. + :vartype new_timestamp: str + :ivar timescale: Gets the timescale in which both timestamps and + discontinuity gap are represented. + :vartype timescale: str + :ivar discontinuity_gap: Gets the discontinuity gap between + PreviousTimestamp and NewTimestamp. + :vartype discontinuity_gap: str + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'previous_timestamp': {'readonly': True}, + 'new_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'discontinuity_gap': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, + 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.previous_timestamp = None + self.new_timestamp = None + self.timescale = None + self.discontinuity_gap = None + + +class ResourceActionCancelData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Resources.ResourceActionCancel event. This is raised when a + resource action operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceActionCancelData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceActionFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionFailure event. This is raised when a + resource action operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceActionFailureData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceActionSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionSuccess event. This is raised when a + resource action operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceActionSuccessData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceDeleteCancelData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Resources.ResourceDeleteCancel event. This is raised when a + resource delete operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceDeleteCancelData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceDeleteFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceDeleteFailure event. This is raised when a + resource delete operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceDeleteFailureData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceDeleteSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a + resource delete operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceDeleteSuccessData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceWriteCancelData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceWriteCancel event. This is raised when a + resource create or update operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceWriteCancelData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceWriteFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceWriteFailure event. This is raised when a + resource create or update operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceWriteFailureData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ResourceWriteSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceWriteSuccess event. This is raised when a + resource create or update operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceWriteSuccessData, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.resource_provider = kwargs.get('resource_provider', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.operation_name = kwargs.get('operation_name', None) + self.status = kwargs.get('status', None) + self.authorization = kwargs.get('authorization', None) + self.claims = kwargs.get('claims', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.http_request = kwargs.get('http_request', None) + + +class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) + + +class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = kwargs.get('namespace_name', None) + self.request_uri = kwargs.get('request_uri', None) + self.entity_type = kwargs.get('entity_type', None) + self.queue_name = kwargs.get('queue_name', None) + self.topic_name = kwargs.get('topic_name', None) + self.subscription_name = kwargs.get('subscription_name', None) + + +class SignalRServiceClientConnectionConnectedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.SignalRService.ClientConnectionConnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.hub_name = kwargs.get('hub_name', None) + self.connection_id = kwargs.get('connection_id', None) + self.user_id = kwargs.get('user_id', None) + + +class SignalRServiceClientConnectionDisconnectedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.SignalRService.ClientConnectionDisconnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + :param error_message: The message of error that cause the client + connection disconnected. + :type error_message: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + self.hub_name = kwargs.get('hub_name', None) + self.connection_id = kwargs.get('connection_id', None) + self.user_id = kwargs.get('user_id', None) + self.error_message = kwargs.get('error_message', None) + + +class StorageBlobCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.BlobCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the + storage API operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the blob at the time this event was triggered. + :type e_tag: str + :param content_type: The content type of the blob. This is the same as + what would be returned in the Content-Type header from the blob. + :type content_type: str + :param content_length: The size of the blob in bytes. This is the same as + what would be returned in the Content-Length header from the blob. + :type content_length: long + :param content_offset: The offset of the blob in bytes. + :type content_offset: long + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular blob name. Users can use standard string + comparison to understand the relative sequence of two events on the same + blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_length': {'key': 'contentLength', 'type': 'long'}, + 'content_offset': {'key': 'contentOffset', 'type': 'long'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StorageBlobCreatedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.e_tag = kwargs.get('e_tag', None) + self.content_type = kwargs.get('content_type', None) + self.content_length = kwargs.get('content_length', None) + self.content_offset = kwargs.get('content_offset', None) + self.blob_type = kwargs.get('blob_type', None) + self.url = kwargs.get('url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageBlobDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.BlobDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the + storage API operation that triggered this event. + :type request_id: str + :param content_type: The content type of the blob. This is the same as + what would be returned in the Content-Type header from the blob. + :type content_type: str + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular blob name. Users can use standard string + comparison to understand the relative sequence of two events on the same + blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StorageBlobDeletedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.content_type = kwargs.get('content_type', None) + self.blob_type = kwargs.get('blob_type', None) + self.url = kwargs.get('url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageBlobRenamedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.BlobRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param source_url: The path to the blob that was renamed. + :type source_url: str + :param destination_url: The new path to the blob after the rename + operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular blob name. Users can use standard string + comparison to understand the relative sequence of two events on the same + blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StorageBlobRenamedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.source_url = kwargs.get('source_url', None) + self.destination_url = kwargs.get('destination_url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageDirectoryCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.DirectoryCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the directory at the time this event was + triggered. + :type e_tag: str + :param url: The path to the directory. + :type url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular directory name. Users can use standard string + comparison to understand the relative sequence of two events on the same + directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StorageDirectoryCreatedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.e_tag = kwargs.get('e_tag', None) + self.url = kwargs.get('url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageDirectoryDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.DirectoryDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param url: The path to the deleted directory. + :type url: str + :param recursive: Is this event for a recursive delete operation. + :type recursive: bool + :param sequencer: An opaque string value representing the logical sequence + of events for any particular directory name. Users can use standard string + comparison to understand the relative sequence of two events on the same + directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'bool'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StorageDirectoryDeletedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.url = kwargs.get('url', None) + self.recursive = kwargs.get('recursive', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class StorageDirectoryRenamedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.DirectoryRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param source_url: The path to the directory that was renamed. + :type source_url: str + :param destination_url: The new path to the directory after the rename + operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular directory name. Users can use standard string + comparison to understand the relative sequence of two events on the same + directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(StorageDirectoryRenamedEventData, self).__init__(**kwargs) + self.api = kwargs.get('api', None) + self.client_request_id = kwargs.get('client_request_id', None) + self.request_id = kwargs.get('request_id', None) + self.source_url = kwargs.get('source_url', None) + self.destination_url = kwargs.get('destination_url', None) + self.sequencer = kwargs.get('sequencer', None) + self.identity = kwargs.get('identity', None) + self.storage_diagnostics = kwargs.get('storage_diagnostics', None) + + +class SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None + + +class SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None + + +class SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = kwargs.get('validation_response', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models_py3.py new file mode 100644 index 000000000000..14134f96aa52 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/_models_py3.py @@ -0,0 +1,3843 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AppConfigurationKeyValueDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.AppConfiguration.KeyValueDeleted event. + + :param key: The key used to identify the key-value that was deleted. + :type key: str + :param label: The label, if any, used to identify the key-value that was + deleted. + :type label: str + :param etag: The etag representing the key-value that was deleted. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, label: str=None, etag: str=None, **kwargs) -> None: + super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) + self.key = key + self.label = label + self.etag = etag + + +class AppConfigurationKeyValueModifiedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.AppConfiguration.KeyValueModified event. + + :param key: The key used to identify the key-value that was modified. + :type key: str + :param label: The label, if any, used to identify the key-value that was + modified. + :type label: str + :param etag: The etag representing the new state of the key-value. + :type etag: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, label: str=None, etag: str=None, **kwargs) -> None: + super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) + self.key = key + self.label = label + self.etag = etag + + +class ContainerRegistryArtifactEventData(Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: + super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.action = action + self.target = target + + +class ContainerRegistryArtifactEventTarget(Model): + """The target of the event. + + :param media_type: The MIME type of the artifact. + :type media_type: str + :param size: The size in bytes of the artifact. + :type size: long + :param digest: The digest of the artifact. + :type digest: str + :param repository: The repository name of the artifact. + :type repository: str + :param tag: The tag of the artifact. + :type tag: str + :param name: The name of the artifact. + :type name: str + :param version: The version of the artifact. + :type version: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, media_type: str=None, size: int=None, digest: str=None, repository: str=None, tag: str=None, name: str=None, version: str=None, **kwargs) -> None: + super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) + self.media_type = media_type + self.size = size + self.digest = digest + self.repository = repository + self.tag = tag + self.name = name + self.version = version + + +class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ChartDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: + super(ContainerRegistryChartDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) + + +class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ChartPushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, + } + + def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: + super(ContainerRegistryChartPushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) + + +class ContainerRegistryEventActor(Model): + """The agent that initiated the event. For most situations, this could be from + the authorization context of the request. + + :param name: The subject or username associated with the request context + that generated the event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ContainerRegistryEventActor, self).__init__(**kwargs) + self.name = name + + +class ContainerRegistryEventData(Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.eventgrid.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: + super(ContainerRegistryEventData, self).__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.action = action + self.target = target + self.request = request + self.actor = actor + self.source = source + + +class ContainerRegistryEventRequest(Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection + that initiated the event. This is the RemoteAddr from the standard http + request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, + as specified by the http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, addr: str=None, host: str=None, method: str=None, useragent: str=None, **kwargs) -> None: + super(ContainerRegistryEventRequest, self).__init__(**kwargs) + self.id = id + self.addr = addr + self.host = host + self.method = method + self.useragent = useragent + + +class ContainerRegistryEventSource(Model): + """The registry node that generated the event. Put differently, while the + actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that + generated the event. Generally, this will be resolved by os.Hostname() + along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after + each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__(self, *, addr: str=None, instance_id: str=None, **kwargs) -> None: + super(ContainerRegistryEventSource, self).__init__(**kwargs) + self.addr = addr + self.instance_id = instance_id + + +class ContainerRegistryEventTarget(Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 + HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__(self, *, media_type: str=None, size: int=None, digest: str=None, length: int=None, repository: str=None, url: str=None, tag: str=None, **kwargs) -> None: + super(ContainerRegistryEventTarget, self).__init__(**kwargs) + self.media_type = media_type + self.size = size + self.digest = digest + self.length = length + self.repository = repository + self.url = url + self.tag = tag + + +class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ImageDeleted event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.eventgrid.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: + super(ContainerRegistryImageDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) + + +class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ContainerRegistry.ImagePushed event. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget + :param request: The request that generated the event. + :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest + :param actor: The agent that initiated the event. For most situations, + this could be from the authorization context of the request. + :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor + :param source: The registry node that generated the event. Put + differently, while the actor initiates the event, the source generates it. + :type source: ~azure.eventgrid.models.ContainerRegistryEventSource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, + 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, + 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, + 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, + } + + def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: + super(ContainerRegistryImagePushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) + + +class DeviceConnectionStateEventInfo(Model): + """Information about the device connection state event. + + :param sequence_number: Sequence number is string representation of a + hexadecimal number. string compare can be used to identify the larger + number because both in ASCII and HEX numbers come after alphabets. If you + are converting the string to hex, then the number is a 256 bit number. + :type sequence_number: str + """ + + _attribute_map = { + 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, + } + + def __init__(self, *, sequence_number: str=None, **kwargs) -> None: + super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) + self.sequence_number = sequence_number + + +class DeviceConnectionStateEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device connection + state event (DeviceConnected, DeviceDisconnected). + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: + super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) + self.device_id = device_id + self.module_id = module_id + self.hub_name = hub_name + self.device_connection_state_event_info = device_connection_state_event_info + + +class DeviceLifeCycleEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device life cycle + event (DeviceCreated, DeviceDeleted). + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud + representation of application device metadata. + :type twin: ~azure.eventgrid.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: + super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) + self.device_id = device_id + self.hub_name = hub_name + self.twin = twin + + +class DeviceTelemetryEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a device telemetry + event (DeviceTelemetry). + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that + can be added to the message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None: + super(DeviceTelemetryEventProperties, self).__init__(**kwargs) + self.body = body + self.properties = properties + self.system_properties = system_properties + + +class DeviceTwinInfo(Model): + """Information about the device twin, which is the cloud representation of + application device metadata. + + :param authentication_type: Authentication type used for this device: + either SAS, SelfSigned, or CertificateAuthority. + :type authentication_type: str + :param cloud_to_device_message_count: Count of cloud to device messages + sent to this device. + :type cloud_to_device_message_count: float + :param connection_state: Whether the device is connected or disconnected. + :type connection_state: str + :param device_id: The unique identifier of the device twin. + :type device_id: str + :param etag: A piece of information that describes the content of the + device twin. Each etag is guaranteed to be unique per device twin. + :type etag: str + :param last_activity_time: The ISO8601 timestamp of the last activity. + :type last_activity_time: str + :param properties: Properties JSON element. + :type properties: ~azure.eventgrid.models.DeviceTwinInfoProperties + :param status: Whether the device twin is enabled or disabled. + :type status: str + :param status_update_time: The ISO8601 timestamp of the last device twin + status update. + :type status_update_time: str + :param version: An integer that is incremented by one each time the device + twin is updated. + :type version: float + :param x509_thumbprint: The thumbprint is a unique value for the x509 + certificate, commonly used to find a particular certificate in a + certificate store. The thumbprint is dynamically generated using the SHA1 + algorithm, and does not physically exist in the certificate. + :type x509_thumbprint: + ~azure.eventgrid.models.DeviceTwinInfoX509Thumbprint + """ + + _attribute_map = { + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'float'}, + 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, + } + + def __init__(self, *, authentication_type: str=None, cloud_to_device_message_count: float=None, connection_state: str=None, device_id: str=None, etag: str=None, last_activity_time: str=None, properties=None, status: str=None, status_update_time: str=None, version: float=None, x509_thumbprint=None, **kwargs) -> None: + super(DeviceTwinInfo, self).__init__(**kwargs) + self.authentication_type = authentication_type + self.cloud_to_device_message_count = cloud_to_device_message_count + self.connection_state = connection_state + self.device_id = device_id + self.etag = etag + self.last_activity_time = last_activity_time + self.properties = properties + self.status = status + self.status_update_time = status_update_time + self.version = version + self.x509_thumbprint = x509_thumbprint + + +class DeviceTwinInfoProperties(Model): + """Properties JSON element. + + :param desired: A portion of the properties that can be written only by + the application back-end, and read by the device. + :type desired: ~azure.eventgrid.models.DeviceTwinProperties + :param reported: A portion of the properties that can be written only by + the device, and read by the application back-end. + :type reported: ~azure.eventgrid.models.DeviceTwinProperties + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, + 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, + } + + def __init__(self, *, desired=None, reported=None, **kwargs) -> None: + super(DeviceTwinInfoProperties, self).__init__(**kwargs) + self.desired = desired + self.reported = reported + + +class DeviceTwinInfoX509Thumbprint(Model): + """The thumbprint is a unique value for the x509 certificate, commonly used to + find a particular certificate in a certificate store. The thumbprint is + dynamically generated using the SHA1 algorithm, and does not physically + exist in the certificate. + + :param primary_thumbprint: Primary thumbprint for the x509 certificate. + :type primary_thumbprint: str + :param secondary_thumbprint: Secondary thumbprint for the x509 + certificate. + :type secondary_thumbprint: str + """ + + _attribute_map = { + 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, + 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, + } + + def __init__(self, *, primary_thumbprint: str=None, secondary_thumbprint: str=None, **kwargs) -> None: + super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) + self.primary_thumbprint = primary_thumbprint + self.secondary_thumbprint = secondary_thumbprint + + +class DeviceTwinMetadata(Model): + """Metadata information for the properties JSON document. + + :param last_updated: The ISO8601 timestamp of the last time the properties + were updated. + :type last_updated: str + """ + + _attribute_map = { + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + } + + def __init__(self, *, last_updated: str=None, **kwargs) -> None: + super(DeviceTwinMetadata, self).__init__(**kwargs) + self.last_updated = last_updated + + +class DeviceTwinProperties(Model): + """A portion of the properties that can be written only by the application + back-end, and read by the device. + + :param metadata: Metadata information for the properties JSON document. + :type metadata: ~azure.eventgrid.models.DeviceTwinMetadata + :param version: Version of device twin properties. + :type version: float + """ + + _attribute_map = { + 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, + 'version': {'key': 'version', 'type': 'float'}, + } + + def __init__(self, *, metadata=None, version: float=None, **kwargs) -> None: + super(DeviceTwinProperties, self).__init__(**kwargs) + self.metadata = metadata + self.version = version + + +class EventGridEvent(Model): + """Properties of an event published to an Event Grid topic. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. An unique identifier for the event. + :type id: str + :param topic: The resource path of the event source. + :type topic: str + :param subject: Required. A resource path relative to the topic path. + :type subject: str + :param data: Required. Event data specific to the event type. + :type data: object + :param event_type: Required. The type of the event that occurred. + :type event_type: str + :param event_time: Required. The time (in UTC) the event was generated. + :type event_time: datetime + :ivar metadata_version: The schema version of the event metadata. + :vartype metadata_version: str + :param data_version: Required. The schema version of the data object. + :type data_version: str + """ + + _validation = { + 'id': {'required': True}, + 'subject': {'required': True}, + 'data': {'required': True}, + 'event_type': {'required': True}, + 'event_time': {'required': True}, + 'metadata_version': {'readonly': True}, + 'data_version': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'topic': {'key': 'topic', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'object'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, + 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, + 'data_version': {'key': 'dataVersion', 'type': 'str'}, + } + + def __init__(self, *, id: str, subject: str, data, event_type: str, event_time, data_version: str, topic: str=None, **kwargs) -> None: + super(EventGridEvent, self).__init__(**kwargs) + self.id = id + self.topic = topic + self.subject = subject + self.data = data + self.event_type = event_type + self.event_time = event_time + self.metadata_version = None + self.data_version = data_version + + +class EventHubCaptureFileCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.EventHub.CaptureFileCreated event. + + :param fileurl: The path to the capture file. + :type fileurl: str + :param file_type: The file type of the capture file. + :type file_type: str + :param partition_id: The shard ID. + :type partition_id: str + :param size_in_bytes: The file size. + :type size_in_bytes: int + :param event_count: The number of events in the file. + :type event_count: int + :param first_sequence_number: The smallest sequence number from the queue. + :type first_sequence_number: int + :param last_sequence_number: The last sequence number from the queue. + :type last_sequence_number: int + :param first_enqueue_time: The first time from the queue. + :type first_enqueue_time: datetime + :param last_enqueue_time: The last time from the queue. + :type last_enqueue_time: datetime + """ + + _attribute_map = { + 'fileurl': {'key': 'fileurl', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'partition_id': {'key': 'partitionId', 'type': 'str'}, + 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, + 'event_count': {'key': 'eventCount', 'type': 'int'}, + 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, + 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, + 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, + 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, fileurl: str=None, file_type: str=None, partition_id: str=None, size_in_bytes: int=None, event_count: int=None, first_sequence_number: int=None, last_sequence_number: int=None, first_enqueue_time=None, last_enqueue_time=None, **kwargs) -> None: + super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) + self.fileurl = fileurl + self.file_type = file_type + self.partition_id = partition_id + self.size_in_bytes = size_in_bytes + self.event_count = event_count + self.first_sequence_number = first_sequence_number + self.last_sequence_number = last_sequence_number + self.first_enqueue_time = first_enqueue_time + self.last_enqueue_time = last_enqueue_time + + +class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceConnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: + super(IotHubDeviceConnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) + + +class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceCreated event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud + representation of application device metadata. + :type twin: ~azure.eventgrid.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: + super(IotHubDeviceCreatedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) + + +class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): + """Event data for Microsoft.Devices.DeviceDeleted event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param twin: Information about the device twin, which is the cloud + representation of application device metadata. + :type twin: ~azure.eventgrid.models.DeviceTwinInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, + } + + def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: + super(IotHubDeviceDeletedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) + + +class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): + """Event data for Microsoft.Devices.DeviceDisconnected event. + + :param device_id: The unique identifier of the device. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type device_id: str + :param module_id: The unique identifier of the module. This case-sensitive + string can be up to 128 characters long, and supports ASCII 7-bit + alphanumeric characters plus the following special characters: - : . + % _ + # * ? ! ( ) , = @ ; $ '. + :type module_id: str + :param hub_name: Name of the IoT Hub where the device was created or + deleted. + :type hub_name: str + :param device_connection_state_event_info: Information about the device + connection state event. + :type device_connection_state_event_info: + ~azure.eventgrid.models.DeviceConnectionStateEventInfo + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'module_id': {'key': 'moduleId', 'type': 'str'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, + } + + def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: + super(IotHubDeviceDisconnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) + + +class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): + """Event data for Microsoft.Devices.DeviceTelemetry event. + + :param body: The content of the message from the device. + :type body: object + :param properties: Application properties are user-defined strings that + can be added to the message. These fields are optional. + :type properties: dict[str, str] + :param system_properties: System properties help identify contents and + source of the messages. + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None: + super(IotHubDeviceTelemetryEventData, self).__init__(body=body, properties=properties, system_properties=system_properties, **kwargs) + + +class KeyVaultCertificateExpiredEventData(Model): + """Schema of the Data property of an EventGridEvent for an CertificateExpired + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultCertificateExpiredEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultCertificateNearExpiryEventData(Model): + """Schema of the Data property of an EventGridEvent for an + CertificateNearExpiry event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultCertificateNearExpiryEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultCertificateNewVersionCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + CertificateNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultCertificateNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultKeyExpiredEventData(Model): + """Schema of the Data property of an EventGridEvent for an KeyExpired event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultKeyExpiredEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultKeyNearExpiryEventData(Model): + """Schema of the Data property of an EventGridEvent for an KeyNearExpiry + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultKeyNearExpiryEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultKeyNewVersionCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + KeyNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultKeyNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultSecretExpiredEventData(Model): + """Schema of the Data property of an EventGridEvent for an SecretExpired + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultSecretExpiredEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultSecretNearExpiryEventData(Model): + """Schema of the Data property of an EventGridEvent for an SecretNearExpiry + event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultSecretNearExpiryEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class KeyVaultSecretNewVersionCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + SecretNewVersionCreated event. + + :param id: The id of the object that triggered this event. + :type id: str + :param vault_name: Key vault name of the object that triggered this event. + :type vault_name: str + :param object_type: The type of the object that triggered this event + :type object_type: str + :param object_name: The name of the object that triggered this event + :type object_name: str + :param version: The version of the object that triggered this event + :type version: str + :param nbf: Not before date of the object that triggered this event + :type nbf: float + :param exp: The expiration date of the object that triggered this event + :type exp: float + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'nbf': {'key': 'nbf', 'type': 'float'}, + 'exp': {'key': 'exp', 'type': 'float'}, + } + + def __init__(self, *, id: str=None, vault_name: str=None, object_type: str=None, object_name: str=None, version: str=None, nbf: float=None, exp: float=None, **kwargs) -> None: + super(KeyVaultSecretNewVersionCreatedEventData, self).__init__(**kwargs) + self.id = id + self.vault_name = vault_name + self.object_type = object_type + self.object_name = object_name + self.version = version + self.nbf = nbf + self.exp = exp + + +class MachineLearningServicesDatasetDriftDetectedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.DatasetDriftDetected event. + + :param data_drift_id: The ID of the data drift monitor that triggered the + event. + :type data_drift_id: str + :param data_drift_name: The name of the data drift monitor that triggered + the event. + :type data_drift_name: str + :param run_id: The ID of the Run that detected data drift. + :type run_id: str + :param base_dataset_id: The ID of the base Dataset used to detect drift. + :type base_dataset_id: str + :param target_dataset_id: The ID of the target Dataset used to detect + drift. + :type target_dataset_id: str + :param drift_coefficient: The coefficient result that triggered the event. + :type drift_coefficient: float + :param start_time: The start time of the target dataset time series that + resulted in drift detection. + :type start_time: datetime + :param end_time: The end time of the target dataset time series that + resulted in drift detection. + :type end_time: datetime + """ + + _attribute_map = { + 'data_drift_id': {'key': 'dataDriftId', 'type': 'str'}, + 'data_drift_name': {'key': 'dataDriftName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'base_dataset_id': {'key': 'baseDatasetId', 'type': 'str'}, + 'target_dataset_id': {'key': 'targetDatasetId', 'type': 'str'}, + 'drift_coefficient': {'key': 'driftCoefficient', 'type': 'float'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, data_drift_id: str=None, data_drift_name: str=None, run_id: str=None, base_dataset_id: str=None, target_dataset_id: str=None, drift_coefficient: float=None, start_time=None, end_time=None, **kwargs) -> None: + super(MachineLearningServicesDatasetDriftDetectedEventData, self).__init__(**kwargs) + self.data_drift_id = data_drift_id + self.data_drift_name = data_drift_name + self.run_id = run_id + self.base_dataset_id = base_dataset_id + self.target_dataset_id = target_dataset_id + self.drift_coefficient = drift_coefficient + self.start_time = start_time + self.end_time = end_time + + +class MachineLearningServicesModelDeployedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.ModelDeployed event. + + :param service_name: The name of the deployed service. + :type service_name: str + :param service_compute_type: The compute type (e.g. ACI, AKS) of the + deployed service. + :type service_compute_type: str + :param model_ids: A common separated list of model IDs. The IDs of the + models deployed in the service. + :type model_ids: str + :param service_tags: The tags of the deployed service. + :type service_tags: object + :param service_properties: The properties of the deployed service. + :type service_properties: object + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'service_compute_type': {'key': 'serviceComputeType', 'type': 'str'}, + 'model_ids': {'key': 'modelIds', 'type': 'str'}, + 'service_tags': {'key': 'serviceTags', 'type': 'object'}, + 'service_properties': {'key': 'serviceProperties', 'type': 'object'}, + } + + def __init__(self, *, service_name: str=None, service_compute_type: str=None, model_ids: str=None, service_tags=None, service_properties=None, **kwargs) -> None: + super(MachineLearningServicesModelDeployedEventData, self).__init__(**kwargs) + self.service_name = service_name + self.service_compute_type = service_compute_type + self.model_ids = model_ids + self.service_tags = service_tags + self.service_properties = service_properties + + +class MachineLearningServicesModelRegisteredEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.ModelRegistered event. + + :param model_name: The name of the model that was registered. + :type model_name: str + :param model_version: The version of the model that was registered. + :type model_version: int + :param model_tags: The tags of the model that was registered. + :type model_tags: object + :param model_properties: The properties of the model that was registered. + :type model_properties: object + """ + + _attribute_map = { + 'model_name': {'key': 'modelName', 'type': 'str'}, + 'model_version': {'key': 'modelVersion', 'type': 'int'}, + 'model_tags': {'key': 'modelTags', 'type': 'object'}, + 'model_properties': {'key': 'modelProperties', 'type': 'object'}, + } + + def __init__(self, *, model_name: str=None, model_version: int=None, model_tags=None, model_properties=None, **kwargs) -> None: + super(MachineLearningServicesModelRegisteredEventData, self).__init__(**kwargs) + self.model_name = model_name + self.model_version = model_version + self.model_tags = model_tags + self.model_properties = model_properties + + +class MachineLearningServicesRunCompletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.MachineLearningServices.RunCompleted event. + + :param experiment_id: The ID of the experiment that the run belongs to. + :type experiment_id: str + :param experiment_name: The name of the experiment that the run belongs + to. + :type experiment_name: str + :param run_id: The ID of the Run that was completed. + :type run_id: str + :param run_type: The Run Type of the completed Run. + :type run_type: str + :param run_tags: The tags of the completed Run. + :type run_tags: object + :param run_properties: The properties of the completed Run. + :type run_properties: object + """ + + _attribute_map = { + 'experiment_id': {'key': 'experimentId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'run_type': {'key': 'runType', 'type': 'str'}, + 'run_tags': {'key': 'runTags', 'type': 'object'}, + 'run_properties': {'key': 'runProperties', 'type': 'object'}, + } + + def __init__(self, *, experiment_id: str=None, experiment_name: str=None, run_id: str=None, run_type: str=None, run_tags=None, run_properties=None, **kwargs) -> None: + super(MachineLearningServicesRunCompletedEventData, self).__init__(**kwargs) + self.experiment_id = experiment_id + self.experiment_name = experiment_name + self.run_id = run_id + self.run_type = run_type + self.run_tags = run_tags + self.run_properties = run_properties + + +class MapsGeofenceEventProperties(Model): + """Schema of the Data property of an EventGridEvent for a Geofence event + (GeofenceEntered, GeofenceExited, GeofenceResult). + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: + super(MapsGeofenceEventProperties, self).__init__(**kwargs) + self.expired_geofence_geometry_id = expired_geofence_geometry_id + self.geometries = geometries + self.invalid_period_geofence_geometry_id = invalid_period_geofence_geometry_id + self.is_event_published = is_event_published + + +class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Maps.GeofenceEntered event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: + super(MapsGeofenceEnteredEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) + + +class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Maps.GeofenceExited event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: + super(MapsGeofenceExitedEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) + + +class MapsGeofenceGeometry(Model): + """The geofence geometry. + + :param device_id: ID of the device. + :type device_id: str + :param distance: Distance from the coordinate to the closest border of the + geofence. Positive means the coordinate is outside of the geofence. If the + coordinate is outside of the geofence, but more than the value of + searchBuffer away from the closest geofence border, then the value is 999. + Negative means the coordinate is inside of the geofence. If the coordinate + is inside the polygon, but more than the value of searchBuffer away from + the closest geofencing border,then the value is -999. A value of 999 means + that there is great confidence the coordinate is well outside the + geofence. A value of -999 means that there is great confidence the + coordinate is well within the geofence. + :type distance: float + :param geometry_id: The unique ID for the geofence geometry. + :type geometry_id: str + :param nearest_lat: Latitude of the nearest point of the geometry. + :type nearest_lat: float + :param nearest_lon: Longitude of the nearest point of the geometry. + :type nearest_lon: float + :param ud_id: The unique id returned from user upload service when + uploading a geofence. Will not be included in geofencing post API. + :type ud_id: str + """ + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'distance': {'key': 'distance', 'type': 'float'}, + 'geometry_id': {'key': 'geometryId', 'type': 'str'}, + 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, + 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, + 'ud_id': {'key': 'udId', 'type': 'str'}, + } + + def __init__(self, *, device_id: str=None, distance: float=None, geometry_id: str=None, nearest_lat: float=None, nearest_lon: float=None, ud_id: str=None, **kwargs) -> None: + super(MapsGeofenceGeometry, self).__init__(**kwargs) + self.device_id = device_id + self.distance = distance + self.geometry_id = geometry_id + self.nearest_lat = nearest_lat + self.nearest_lon = nearest_lon + self.ud_id = ud_id + + +class MapsGeofenceResultEventData(MapsGeofenceEventProperties): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Maps.GeofenceResult event. + + :param expired_geofence_geometry_id: Lists of the geometry ID of the + geofence which is expired relative to the user time in the request. + :type expired_geofence_geometry_id: list[str] + :param geometries: Lists the fence geometries that either fully contain + the coordinate position or have an overlap with the searchBuffer around + the fence. + :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] + :param invalid_period_geofence_geometry_id: Lists of the geometry ID of + the geofence which is in invalid period relative to the user time in the + request. + :type invalid_period_geofence_geometry_id: list[str] + :param is_event_published: True if at least one event is published to the + Azure Maps event subscriber, false if no event is published to the Azure + Maps event subscriber. + :type is_event_published: bool + """ + + _attribute_map = { + 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, + 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, + 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, + 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, + } + + def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: + super(MapsGeofenceResultEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) + + +class MediaJobStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, *, correlation_data=None, **kwargs) -> None: + super(MediaJobStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.state = None + self.correlation_data = correlation_data + + +class MediaJobCanceledEventData(MediaJobStateChangeEventData): + """Job canceled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~azure.eventgrid.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: + super(MediaJobCanceledEventData, self).__init__(correlation_data=correlation_data, **kwargs) + self.outputs = outputs + + +class MediaJobCancelingEventData(MediaJobStateChangeEventData): + """Job canceling event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, *, correlation_data=None, **kwargs) -> None: + super(MediaJobCancelingEventData, self).__init__(correlation_data=correlation_data, **kwargs) + + +class MediaJobError(Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code describing the error. Possible values include: + 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', + 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', + 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' + :vartype code: str or ~azure.eventgrid.models.MediaJobErrorCode + :ivar message: A human-readable language-dependent representation of the + error. + :vartype message: str + :ivar category: Helps with categorization of errors. Possible values + include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' + :vartype category: str or ~azure.eventgrid.models.MediaJobErrorCategory + :ivar retry: Indicates that it may be possible to retry the Job. If retry + is unsuccessful, please contact Azure support via Azure Portal. Possible + values include: 'DoNotRetry', 'MayRetry' + :vartype retry: str or ~azure.eventgrid.models.MediaJobRetry + :ivar details: An array of details about specific errors that led to this + reported error. + :vartype details: list[~azure.eventgrid.models.MediaJobErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'category': {'readonly': True}, + 'retry': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'MediaJobErrorCode'}, + 'message': {'key': 'message', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'MediaJobErrorCategory'}, + 'retry': {'key': 'retry', 'type': 'MediaJobRetry'}, + 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaJobError, self).__init__(**kwargs) + self.code = None + self.message = None + self.category = None + self.retry = None + self.details = None + + +class MediaJobErrorDetail(Model): + """Details of JobOutput errors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Code describing the error detail. + :vartype code: str + :ivar message: A human-readable representation of the error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaJobErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + + +class MediaJobErroredEventData(MediaJobStateChangeEventData): + """Job error state event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~azure.eventgrid.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: + super(MediaJobErroredEventData, self).__init__(correlation_data=correlation_data, **kwargs) + self.outputs = outputs + + +class MediaJobFinishedEventData(MediaJobStateChangeEventData): + """Job finished event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + :param outputs: Gets the Job outputs. + :type outputs: list[~azure.eventgrid.models.MediaJobOutput] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, + } + + def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: + super(MediaJobFinishedEventData, self).__init__(correlation_data=correlation_data, **kwargs) + self.outputs = outputs + + +class MediaJobOutput(Model): + """The event data for a Job output. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MediaJobOutputAsset + + All required parameters must be populated in order to send to Azure. + + :param error: Gets the Job output error. + :type error: ~azure.eventgrid.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :type state: str or ~azure.eventgrid.models.MediaJobState + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} + } + + def __init__(self, *, progress: int, state, error=None, label: str=None, **kwargs) -> None: + super(MediaJobOutput, self).__init__(**kwargs) + self.error = error + self.label = label + self.progress = progress + self.state = state + self.odatatype = None + + +class MediaJobOutputAsset(MediaJobOutput): + """The event data for a Job output asset. + + All required parameters must be populated in order to send to Azure. + + :param error: Gets the Job output error. + :type error: ~azure.eventgrid.models.MediaJobError + :param label: Gets the Job output label. + :type label: str + :param progress: Required. Gets the Job output progress. + :type progress: long + :param state: Required. Gets the Job output state. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :type state: str or ~azure.eventgrid.models.MediaJobState + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param asset_name: Gets the Job output asset name. + :type asset_name: str + """ + + _validation = { + 'progress': {'required': True}, + 'state': {'required': True}, + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'MediaJobError'}, + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'asset_name': {'key': 'assetName', 'type': 'str'}, + } + + def __init__(self, *, progress: int, state, error=None, label: str=None, asset_name: str=None, **kwargs) -> None: + super(MediaJobOutputAsset, self).__init__(error=error, label=label, progress=progress, state=state, **kwargs) + self.asset_name = asset_name + self.odatatype = '#Microsoft.Media.JobOutputAsset' + + +class MediaJobOutputStateChangeEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Media.JobOutputStateChange event. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) + self.previous_state = None + self.output = output + self.job_correlation_data = job_correlation_data + + +class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): + """Job output canceled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputCanceledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): + """Job output canceling event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputCancelingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): + """Job output error event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputErroredEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): + """Job output finished event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputFinishedEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): + """Job output processing event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputProcessingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobOutputProgressEventData(Model): + """Job Output Progress Event Data. + + :param label: Gets the Job output label. + :type label: str + :param progress: Gets the Job output progress. + :type progress: long + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _attribute_map = { + 'label': {'key': 'label', 'type': 'str'}, + 'progress': {'key': 'progress', 'type': 'long'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, label: str=None, progress: int=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputProgressEventData, self).__init__(**kwargs) + self.label = label + self.progress = progress + self.job_correlation_data = job_correlation_data + + +class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): + """Job output scheduled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :param output: Gets the output. + :type output: ~azure.eventgrid.models.MediaJobOutput + :param job_correlation_data: Gets the Job correlation data. + :type job_correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'output': {'key': 'output', 'type': 'MediaJobOutput'}, + 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, + } + + def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: + super(MediaJobOutputScheduledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) + + +class MediaJobProcessingEventData(MediaJobStateChangeEventData): + """Job processing event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, *, correlation_data=None, **kwargs) -> None: + super(MediaJobProcessingEventData, self).__init__(correlation_data=correlation_data, **kwargs) + + +class MediaJobScheduledEventData(MediaJobStateChangeEventData): + """Job scheduled event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar previous_state: The previous state of the Job. Possible values + include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + 'Queued', 'Scheduled' + :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState + :ivar state: The new state of the Job. Possible values include: + 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + 'Scheduled' + :vartype state: str or ~azure.eventgrid.models.MediaJobState + :param correlation_data: Gets the Job correlation data. + :type correlation_data: dict[str, str] + """ + + _validation = { + 'previous_state': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, + 'state': {'key': 'state', 'type': 'MediaJobState'}, + 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, + } + + def __init__(self, *, correlation_data=None, **kwargs) -> None: + super(MediaJobScheduledEventData, self).__init__(correlation_data=correlation_data, **kwargs) + + +class MediaLiveEventConnectionRejectedEventData(Model): + """Encoder connection rejected event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventEncoderConnectedEventData(Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + + +class MediaLiveEventEncoderDisconnectedEventData(Model): + """Encoder disconnected event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar stream_id: Gets the stream Id. + :vartype stream_id: str + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar result_code: Gets the result code. + :vartype result_code: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'stream_id': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'result_code': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'stream_id': {'key': 'streamId', 'type': 'str'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.stream_id = None + self.encoder_ip = None + self.encoder_port = None + self.result_code = None + + +class MediaLiveEventIncomingDataChunkDroppedEventData(Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Gets the timestamp of the data chunk dropped. + :vartype timestamp: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar timescale: Gets the timescale of the Timestamp. + :vartype timescale: str + :ivar result_code: Gets the result code for fragment drop operation. + :vartype result_code: str + :ivar track_name: Gets the name of the track for which fragment is + dropped. + :vartype track_name: str + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'track_type': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'timescale': {'readonly': True}, + 'result_code': {'readonly': True}, + 'track_name': {'readonly': True}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) + self.timestamp = None + self.track_type = None + self.bitrate = None + self.timescale = None + self.result_code = None + self.track_name = None + + +class MediaLiveEventIncomingStreamReceivedEventData(Model): + """Encoder connect event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ingest_url: Gets the ingest URL provided by the live event. + :vartype ingest_url: str + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar encoder_ip: Gets the remote IP. + :vartype encoder_ip: str + :ivar encoder_port: Gets the remote port. + :vartype encoder_port: str + :ivar timestamp: Gets the first timestamp of the data chunk received. + :vartype timestamp: str + :ivar duration: Gets the duration of the first data chunk. + :vartype duration: str + :ivar timescale: Gets the timescale in which timestamp is represented. + :vartype timescale: str + """ + + _validation = { + 'ingest_url': {'readonly': True}, + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'encoder_ip': {'readonly': True}, + 'encoder_port': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, + 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) + self.ingest_url = None + self.track_type = None + self.track_name = None + self.bitrate = None + self.encoder_ip = None + self.encoder_port = None + self.timestamp = None + self.duration = None + self.timescale = None + + +class MediaLiveEventIncomingStreamsOutOfSyncEventData(Model): + """Incoming streams out of sync event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar min_last_timestamp: Gets the minimum last timestamp received. + :vartype min_last_timestamp: str + :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with + minimum last timestamp. + :vartype type_of_stream_with_min_last_timestamp: str + :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks + (audio or video). + :vartype max_last_timestamp: str + :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with + maximum last timestamp. + :vartype type_of_stream_with_max_last_timestamp: str + :ivar timescale_of_min_last_timestamp: Gets the timescale in which + "MinLastTimestamp" is represented. + :vartype timescale_of_min_last_timestamp: str + :ivar timescale_of_max_last_timestamp: Gets the timescale in which + "MaxLastTimestamp" is represented. + :vartype timescale_of_max_last_timestamp: str + """ + + _validation = { + 'min_last_timestamp': {'readonly': True}, + 'type_of_stream_with_min_last_timestamp': {'readonly': True}, + 'max_last_timestamp': {'readonly': True}, + 'type_of_stream_with_max_last_timestamp': {'readonly': True}, + 'timescale_of_min_last_timestamp': {'readonly': True}, + 'timescale_of_max_last_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, + 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, + 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, + 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, + 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.min_last_timestamp = None + self.type_of_stream_with_min_last_timestamp = None + self.max_last_timestamp = None + self.type_of_stream_with_max_last_timestamp = None + self.timescale_of_min_last_timestamp = None + self.timescale_of_max_last_timestamp = None + + +class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(Model): + """Incoming video stream out of synch event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar first_timestamp: Gets the first timestamp received for one of the + quality levels. + :vartype first_timestamp: str + :ivar first_duration: Gets the duration of the data chunk with first + timestamp. + :vartype first_duration: str + :ivar second_timestamp: Gets the timestamp received for some other quality + levels. + :vartype second_timestamp: str + :ivar second_duration: Gets the duration of the data chunk with second + timestamp. + :vartype second_duration: str + :ivar timescale: Gets the timescale in which both the timestamps and + durations are represented. + :vartype timescale: str + """ + + _validation = { + 'first_timestamp': {'readonly': True}, + 'first_duration': {'readonly': True}, + 'second_timestamp': {'readonly': True}, + 'second_duration': {'readonly': True}, + 'timescale': {'readonly': True}, + } + + _attribute_map = { + 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, + 'first_duration': {'key': 'firstDuration', 'type': 'str'}, + 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, + 'second_duration': {'key': 'secondDuration', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) + self.first_timestamp = None + self.first_duration = None + self.second_timestamp = None + self.second_duration = None + self.timescale = None + + +class MediaLiveEventIngestHeartbeatEventData(Model): + """Ingest fragment dropped event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate of the track. + :vartype bitrate: long + :ivar incoming_bitrate: Gets the incoming bitrate. + :vartype incoming_bitrate: long + :ivar last_timestamp: Gets the last timestamp. + :vartype last_timestamp: str + :ivar timescale: Gets the timescale of the last timestamp. + :vartype timescale: str + :ivar overlap_count: Gets the fragment Overlap count. + :vartype overlap_count: long + :ivar discontinuity_count: Gets the fragment Discontinuity count. + :vartype discontinuity_count: long + :ivar nonincreasing_count: Gets Non increasing count. + :vartype nonincreasing_count: long + :ivar unexpected_bitrate: Gets a value indicating whether unexpected + bitrate is present or not. + :vartype unexpected_bitrate: bool + :ivar state: Gets the state of the live event. + :vartype state: str + :ivar healthy: Gets a value indicating whether preview is healthy or not. + :vartype healthy: bool + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'incoming_bitrate': {'readonly': True}, + 'last_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'overlap_count': {'readonly': True}, + 'discontinuity_count': {'readonly': True}, + 'nonincreasing_count': {'readonly': True}, + 'unexpected_bitrate': {'readonly': True}, + 'state': {'readonly': True}, + 'healthy': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, + 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, + 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, + 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, + 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'healthy': {'key': 'healthy', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.incoming_bitrate = None + self.last_timestamp = None + self.timescale = None + self.overlap_count = None + self.discontinuity_count = None + self.nonincreasing_count = None + self.unexpected_bitrate = None + self.state = None + self.healthy = None + + +class MediaLiveEventTrackDiscontinuityDetectedEventData(Model): + """Ingest track discontinuity detected event data. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar track_type: Gets the type of the track (Audio / Video). + :vartype track_type: str + :ivar track_name: Gets the track name. + :vartype track_name: str + :ivar bitrate: Gets the bitrate. + :vartype bitrate: long + :ivar previous_timestamp: Gets the timestamp of the previous fragment. + :vartype previous_timestamp: str + :ivar new_timestamp: Gets the timestamp of the current fragment. + :vartype new_timestamp: str + :ivar timescale: Gets the timescale in which both timestamps and + discontinuity gap are represented. + :vartype timescale: str + :ivar discontinuity_gap: Gets the discontinuity gap between + PreviousTimestamp and NewTimestamp. + :vartype discontinuity_gap: str + """ + + _validation = { + 'track_type': {'readonly': True}, + 'track_name': {'readonly': True}, + 'bitrate': {'readonly': True}, + 'previous_timestamp': {'readonly': True}, + 'new_timestamp': {'readonly': True}, + 'timescale': {'readonly': True}, + 'discontinuity_gap': {'readonly': True}, + } + + _attribute_map = { + 'track_type': {'key': 'trackType', 'type': 'str'}, + 'track_name': {'key': 'trackName', 'type': 'str'}, + 'bitrate': {'key': 'bitrate', 'type': 'long'}, + 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, + 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, + 'timescale': {'key': 'timescale', 'type': 'str'}, + 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) + self.track_type = None + self.track_name = None + self.bitrate = None + self.previous_timestamp = None + self.new_timestamp = None + self.timescale = None + self.discontinuity_gap = None + + +class ResourceActionCancelData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Resources.ResourceActionCancel event. This is raised when a + resource action operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceActionCancelData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceActionFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionFailure event. This is raised when a + resource action operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceActionFailureData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceActionSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceActionSuccess event. This is raised when a + resource action operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceActionSuccessData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceDeleteCancelData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Resources.ResourceDeleteCancel event. This is raised when a + resource delete operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceDeleteCancelData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceDeleteFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceDeleteFailure event. This is raised when a + resource delete operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceDeleteFailureData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceDeleteSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a + resource delete operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceDeleteSuccessData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceWriteCancelData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceWriteCancel event. This is raised when a + resource create or update operation is canceled. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceWriteCancelData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceWriteFailureData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceWriteFailure event. This is raised when a + resource create or update operation fails. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceWriteFailureData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ResourceWriteSuccessData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.Resources.ResourceWriteSuccess event. This is raised when a + resource create or update operation succeeds. + + :param tenant_id: The tenant ID of the resource. + :type tenant_id: str + :param subscription_id: The subscription ID of the resource. + :type subscription_id: str + :param resource_group: The resource group of the resource. + :type resource_group: str + :param resource_provider: The resource provider performing the operation. + :type resource_provider: str + :param resource_uri: The URI of the resource in the operation. + :type resource_uri: str + :param operation_name: The operation that was performed. + :type operation_name: str + :param status: The status of the operation. + :type status: str + :param authorization: The requested authorization for the operation. + :type authorization: str + :param claims: The properties of the claims. + :type claims: str + :param correlation_id: An operation ID used for troubleshooting. + :type correlation_id: str + :param http_request: The details of the operation. + :type http_request: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'authorization': {'key': 'authorization', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'http_request': {'key': 'httpRequest', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: + super(ResourceWriteSuccessData, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.subscription_id = subscription_id + self.resource_group = resource_group + self.resource_provider = resource_provider + self.resource_uri = resource_uri + self.operation_name = operation_name + self.status = status + self.authorization = authorization + self.claims = claims + self.correlation_id = correlation_id + self.http_request = http_request + + +class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name + + +class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + + :param namespace_name: The namespace name of the Microsoft.ServiceBus + resource. + :type namespace_name: str + :param request_uri: The endpoint of the Microsoft.ServiceBus resource. + :type request_uri: str + :param entity_type: The entity type of the Microsoft.ServiceBus resource. + Could be one of 'queue' or 'subscriber'. + :type entity_type: str + :param queue_name: The name of the Microsoft.ServiceBus queue. If the + entity type is of type 'subscriber', then this value will be null. + :type queue_name: str + :param topic_name: The name of the Microsoft.ServiceBus topic. If the + entity type is of type 'queue', then this value will be null. + :type topic_name: str + :param subscription_name: The name of the Microsoft.ServiceBus topic's + subscription. If the entity type is of type 'queue', then this value will + be null. + :type subscription_name: str + """ + + _attribute_map = { + 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'entity_type': {'key': 'entityType', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'topic_name': {'key': 'topicName', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, + } + + def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: + super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) + self.namespace_name = namespace_name + self.request_uri = request_uri + self.entity_type = entity_type + self.queue_name = queue_name + self.topic_name = topic_name + self.subscription_name = subscription_name + + +class SignalRServiceClientConnectionConnectedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.SignalRService.ClientConnectionConnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__(self, *, timestamp=None, hub_name: str=None, connection_id: str=None, user_id: str=None, **kwargs) -> None: + super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.hub_name = hub_name + self.connection_id = connection_id + self.user_id = user_id + + +class SignalRServiceClientConnectionDisconnectedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.SignalRService.ClientConnectionDisconnected event. + + :param timestamp: The time at which the event occurred. + :type timestamp: datetime + :param hub_name: The hub of connected client connection. + :type hub_name: str + :param connection_id: The connection Id of connected client connection. + :type connection_id: str + :param user_id: The user Id of connected client connection. + :type user_id: str + :param error_message: The message of error that cause the client + connection disconnected. + :type error_message: str + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'hub_name': {'key': 'hubName', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__(self, *, timestamp=None, hub_name: str=None, connection_id: str=None, user_id: str=None, error_message: str=None, **kwargs) -> None: + super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) + self.timestamp = timestamp + self.hub_name = hub_name + self.connection_id = connection_id + self.user_id = user_id + self.error_message = error_message + + +class StorageBlobCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.BlobCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the + storage API operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the blob at the time this event was triggered. + :type e_tag: str + :param content_type: The content type of the blob. This is the same as + what would be returned in the Content-Type header from the blob. + :type content_type: str + :param content_length: The size of the blob in bytes. This is the same as + what would be returned in the Content-Length header from the blob. + :type content_length: long + :param content_offset: The offset of the blob in bytes. + :type content_offset: long + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular blob name. Users can use standard string + comparison to understand the relative sequence of two events on the same + blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'content_length': {'key': 'contentLength', 'type': 'long'}, + 'content_offset': {'key': 'contentOffset', 'type': 'long'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, e_tag: str=None, content_type: str=None, content_length: int=None, content_offset: int=None, blob_type: str=None, url: str=None, sequencer: str=None, identity: str=None, storage_diagnostics=None, **kwargs) -> None: + super(StorageBlobCreatedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.e_tag = e_tag + self.content_type = content_type + self.content_length = content_length + self.content_offset = content_offset + self.blob_type = blob_type + self.url = url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageBlobDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.BlobDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the Storage service for the + storage API operation that triggered this event. + :type request_id: str + :param content_type: The content type of the blob. This is the same as + what would be returned in the Content-Type header from the blob. + :type content_type: str + :param blob_type: The type of blob. + :type blob_type: str + :param url: The path to the blob. + :type url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular blob name. Users can use standard string + comparison to understand the relative sequence of two events on the same + blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'blob_type': {'key': 'blobType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, content_type: str=None, blob_type: str=None, url: str=None, sequencer: str=None, identity: str=None, storage_diagnostics=None, **kwargs) -> None: + super(StorageBlobDeletedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.content_type = content_type + self.blob_type = blob_type + self.url = url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageBlobRenamedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.BlobRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param source_url: The path to the blob that was renamed. + :type source_url: str + :param destination_url: The new path to the blob after the rename + operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular blob name. Users can use standard string + comparison to understand the relative sequence of two events on the same + blob name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, source_url: str=None, destination_url: str=None, sequencer: str=None, identity: str=None, storage_diagnostics=None, **kwargs) -> None: + super(StorageBlobRenamedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.source_url = source_url + self.destination_url = destination_url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageDirectoryCreatedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.DirectoryCreated event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param e_tag: The etag of the directory at the time this event was + triggered. + :type e_tag: str + :param url: The path to the directory. + :type url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular directory name. Users can use standard string + comparison to understand the relative sequence of two events on the same + directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, e_tag: str=None, url: str=None, sequencer: str=None, identity: str=None, storage_diagnostics=None, **kwargs) -> None: + super(StorageDirectoryCreatedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.e_tag = e_tag + self.url = url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageDirectoryDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.DirectoryDeleted event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param url: The path to the deleted directory. + :type url: str + :param recursive: Is this event for a recursive delete operation. + :type recursive: bool + :param sequencer: An opaque string value representing the logical sequence + of events for any particular directory name. Users can use standard string + comparison to understand the relative sequence of two events on the same + directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'recursive': {'key': 'recursive', 'type': 'bool'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, url: str=None, recursive: bool=None, sequencer: str=None, identity: str=None, storage_diagnostics=None, **kwargs) -> None: + super(StorageDirectoryDeletedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.url = url + self.recursive = recursive + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class StorageDirectoryRenamedEventData(Model): + """Schema of the Data property of an EventGridEvent for an + Microsoft.Storage.DirectoryRenamed event. + + :param api: The name of the API/operation that triggered this event. + :type api: str + :param client_request_id: A request id provided by the client of the + storage API operation that triggered this event. + :type client_request_id: str + :param request_id: The request id generated by the storage service for the + storage API operation that triggered this event. + :type request_id: str + :param source_url: The path to the directory that was renamed. + :type source_url: str + :param destination_url: The new path to the directory after the rename + operation. + :type destination_url: str + :param sequencer: An opaque string value representing the logical sequence + of events for any particular directory name. Users can use standard string + comparison to understand the relative sequence of two events on the same + directory name. + :type sequencer: str + :param identity: The identity of the requester that triggered this event. + :type identity: str + :param storage_diagnostics: For service use only. Diagnostic data + occasionally included by the Azure Storage service. This property should + be ignored by event consumers. + :type storage_diagnostics: object + """ + + _attribute_map = { + 'api': {'key': 'api', 'type': 'str'}, + 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'source_url': {'key': 'sourceUrl', 'type': 'str'}, + 'destination_url': {'key': 'destinationUrl', 'type': 'str'}, + 'sequencer': {'key': 'sequencer', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, + } + + def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, source_url: str=None, destination_url: str=None, sequencer: str=None, identity: str=None, storage_diagnostics=None, **kwargs) -> None: + super(StorageDirectoryRenamedEventData, self).__init__(**kwargs) + self.api = api + self.client_request_id = client_request_id + self.request_id = request_id + self.source_url = source_url + self.destination_url = destination_url + self.sequencer = sequencer + self.identity = identity + self.storage_diagnostics = storage_diagnostics + + +class SubscriptionDeletedEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionDeletedEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar event_subscription_id: The Azure resource ID of the deleted event + subscription. + :vartype event_subscription_id: str + """ + + _validation = { + 'event_subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionDeletedEventData, self).__init__(**kwargs) + self.event_subscription_id = None + + +class SubscriptionValidationEventData(Model): + """Schema of the Data property of an EventGridEvent for a + Microsoft.EventGrid.SubscriptionValidationEvent. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar validation_code: The validation code sent by Azure Event Grid to + validate an event subscription. To complete the validation handshake, the + subscriber must either respond with this validation code as part of the + validation response, or perform a GET request on the validationUrl + (available starting version 2018-05-01-preview). + :vartype validation_code: str + :ivar validation_url: The validation URL sent by Azure Event Grid + (available starting version 2018-05-01-preview). To complete the + validation handshake, the subscriber must either respond with the + validationCode as part of the validation response, or perform a GET + request on the validationUrl (available starting version + 2018-05-01-preview). + :vartype validation_url: str + """ + + _validation = { + 'validation_code': {'readonly': True}, + 'validation_url': {'readonly': True}, + } + + _attribute_map = { + 'validation_code': {'key': 'validationCode', 'type': 'str'}, + 'validation_url': {'key': 'validationUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionValidationEventData, self).__init__(**kwargs) + self.validation_code = None + self.validation_url = None + + +class SubscriptionValidationResponse(Model): + """To complete an event subscription validation handshake, a subscriber can + use either the validationCode or the validationUrl received in a + SubscriptionValidationEvent. When the validationCode is used, the + SubscriptionValidationResponse can be used to build the response. + + :param validation_response: The validation response sent by the subscriber + to Azure Event Grid to complete the validation of an event subscription. + :type validation_response: str + """ + + _attribute_map = { + 'validation_response': {'key': 'validationResponse', 'type': 'str'}, + } + + def __init__(self, *, validation_response: str=None, **kwargs) -> None: + super(SubscriptionValidationResponse, self).__init__(**kwargs) + self.validation_response = validation_response diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data.py deleted file mode 100644 index 8a0adb6c209a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueDeleted event. - - :param key: The key used to identify the key-value that was deleted. - :type key: str - :param label: The label, if any, used to identify the key-value that was - deleted. - :type label: str - :param etag: The etag representing the key-value that was deleted. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.label = kwargs.get('label', None) - self.etag = kwargs.get('etag', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data_py3.py deleted file mode 100644 index 28ac0ab4055f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_deleted_event_data_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueDeleted event. - - :param key: The key used to identify the key-value that was deleted. - :type key: str - :param label: The label, if any, used to identify the key-value that was - deleted. - :type label: str - :param etag: The etag representing the key-value that was deleted. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, label: str=None, etag: str=None, **kwargs) -> None: - super(AppConfigurationKeyValueDeletedEventData, self).__init__(**kwargs) - self.key = key - self.label = label - self.etag = etag diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data.py deleted file mode 100644 index e0147ee242b2..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueModifiedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueModified event. - - :param key: The key used to identify the key-value that was modified. - :type key: str - :param label: The label, if any, used to identify the key-value that was - modified. - :type label: str - :param etag: The etag representing the new state of the key-value. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.label = kwargs.get('label', None) - self.etag = kwargs.get('etag', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data_py3.py deleted file mode 100644 index b37c56469de8..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/app_configuration_key_value_modified_event_data_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class AppConfigurationKeyValueModifiedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.AppConfiguration.KeyValueModified event. - - :param key: The key used to identify the key-value that was modified. - :type key: str - :param label: The label, if any, used to identify the key-value that was - modified. - :type label: str - :param etag: The etag representing the new state of the key-value. - :type etag: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'label': {'key': 'label', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, label: str=None, etag: str=None, **kwargs) -> None: - super(AppConfigurationKeyValueModifiedEventData, self).__init__(**kwargs) - self.key = key - self.label = label - self.etag = etag diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data.py deleted file mode 100644 index 464d9ede7215..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.timestamp = kwargs.get('timestamp', None) - self.action = kwargs.get('action', None) - self.target = kwargs.get('target', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data_py3.py deleted file mode 100644 index abd508e82b8e..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_data_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: - super(ContainerRegistryArtifactEventData, self).__init__(**kwargs) - self.id = id - self.timestamp = timestamp - self.action = action - self.target = target diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target.py deleted file mode 100644 index 661b8c55564a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the artifact. - :type media_type: str - :param size: The size in bytes of the artifact. - :type size: long - :param digest: The digest of the artifact. - :type digest: str - :param repository: The repository name of the artifact. - :type repository: str - :param tag: The tag of the artifact. - :type tag: str - :param name: The name of the artifact. - :type name: str - :param version: The version of the artifact. - :type version: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) - self.media_type = kwargs.get('media_type', None) - self.size = kwargs.get('size', None) - self.digest = kwargs.get('digest', None) - self.repository = kwargs.get('repository', None) - self.tag = kwargs.get('tag', None) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target_py3.py deleted file mode 100644 index 1acf124735a7..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_artifact_event_target_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryArtifactEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the artifact. - :type media_type: str - :param size: The size in bytes of the artifact. - :type size: long - :param digest: The digest of the artifact. - :type digest: str - :param repository: The repository name of the artifact. - :type repository: str - :param tag: The tag of the artifact. - :type tag: str - :param name: The name of the artifact. - :type name: str - :param version: The version of the artifact. - :type version: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, media_type: str=None, size: int=None, digest: str=None, repository: str=None, tag: str=None, name: str=None, version: str=None, **kwargs) -> None: - super(ContainerRegistryArtifactEventTarget, self).__init__(**kwargs) - self.media_type = media_type - self.size = size - self.digest = digest - self.repository = repository - self.tag = tag - self.name = name - self.version = version diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data.py deleted file mode 100644 index bfca65e364b9..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryChartDeletedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data_py3.py deleted file mode 100644 index 7c8b2d18d26a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_deleted_event_data_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data_py3 import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartDeletedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: - super(ContainerRegistryChartDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data.py deleted file mode 100644 index 5a2b4b37e6cf..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartPushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryChartPushedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data_py3.py deleted file mode 100644 index ecce11098dac..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_chart_pushed_event_data_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_artifact_event_data_py3 import ContainerRegistryArtifactEventData - - -class ContainerRegistryChartPushedEventData(ContainerRegistryArtifactEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ChartPushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryArtifactEventTarget - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryArtifactEventTarget'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, **kwargs) -> None: - super(ContainerRegistryChartPushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor.py deleted file mode 100644 index 4fcf82f6a7fc..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventActor(Model): - """The agent that initiated the event. For most situations, this could be from - the authorization context of the request. - - :param name: The subject or username associated with the request context - that generated the event. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventActor, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor_py3.py deleted file mode 100644 index 419b4e917e60..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_actor_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventActor(Model): - """The agent that initiated the event. For most situations, this could be from - the authorization context of the request. - - :param name: The subject or username associated with the request context - that generated the event. - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(ContainerRegistryEventActor, self).__init__(**kwargs) - self.name = name diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data.py deleted file mode 100644 index f2b7d10a3f3f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventData, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.timestamp = kwargs.get('timestamp', None) - self.action = kwargs.get('action', None) - self.target = kwargs.get('target', None) - self.request = kwargs.get('request', None) - self.actor = kwargs.get('actor', None) - self.source = kwargs.get('source', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data_py3.py deleted file mode 100644 index 1729ad8c9cba..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_data_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventData(Model): - """The content of the event request message. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: - super(ContainerRegistryEventData, self).__init__(**kwargs) - self.id = id - self.timestamp = timestamp - self.action = action - self.target = target - self.request = request - self.actor = actor - self.source = source diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request.py deleted file mode 100644 index 51d0917c1eb5..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventRequest(Model): - """The request that generated the event. - - :param id: The ID of the request that initiated the event. - :type id: str - :param addr: The IP or hostname and possibly port of the client connection - that initiated the event. This is the RemoteAddr from the standard http - request. - :type addr: str - :param host: The externally accessible hostname of the registry instance, - as specified by the http host header on incoming requests. - :type host: str - :param method: The request method that generated the event. - :type method: str - :param useragent: The user agent header of the request. - :type useragent: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'addr': {'key': 'addr', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'useragent': {'key': 'useragent', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventRequest, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.addr = kwargs.get('addr', None) - self.host = kwargs.get('host', None) - self.method = kwargs.get('method', None) - self.useragent = kwargs.get('useragent', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request_py3.py deleted file mode 100644 index 4f14fff4ad67..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_request_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventRequest(Model): - """The request that generated the event. - - :param id: The ID of the request that initiated the event. - :type id: str - :param addr: The IP or hostname and possibly port of the client connection - that initiated the event. This is the RemoteAddr from the standard http - request. - :type addr: str - :param host: The externally accessible hostname of the registry instance, - as specified by the http host header on incoming requests. - :type host: str - :param method: The request method that generated the event. - :type method: str - :param useragent: The user agent header of the request. - :type useragent: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'addr': {'key': 'addr', 'type': 'str'}, - 'host': {'key': 'host', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'useragent': {'key': 'useragent', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, addr: str=None, host: str=None, method: str=None, useragent: str=None, **kwargs) -> None: - super(ContainerRegistryEventRequest, self).__init__(**kwargs) - self.id = id - self.addr = addr - self.host = host - self.method = method - self.useragent = useragent diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source.py deleted file mode 100644 index 4cd58ec01101..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventSource(Model): - """The registry node that generated the event. Put differently, while the - actor initiates the event, the source generates it. - - :param addr: The IP or hostname and the port of the registry node that - generated the event. Generally, this will be resolved by os.Hostname() - along with the running port. - :type addr: str - :param instance_id: The running instance of an application. Changes after - each restart. - :type instance_id: str - """ - - _attribute_map = { - 'addr': {'key': 'addr', 'type': 'str'}, - 'instance_id': {'key': 'instanceID', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventSource, self).__init__(**kwargs) - self.addr = kwargs.get('addr', None) - self.instance_id = kwargs.get('instance_id', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source_py3.py deleted file mode 100644 index b12c6c354a61..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_source_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventSource(Model): - """The registry node that generated the event. Put differently, while the - actor initiates the event, the source generates it. - - :param addr: The IP or hostname and the port of the registry node that - generated the event. Generally, this will be resolved by os.Hostname() - along with the running port. - :type addr: str - :param instance_id: The running instance of an application. Changes after - each restart. - :type instance_id: str - """ - - _attribute_map = { - 'addr': {'key': 'addr', 'type': 'str'}, - 'instance_id': {'key': 'instanceID', 'type': 'str'}, - } - - def __init__(self, *, addr: str=None, instance_id: str=None, **kwargs) -> None: - super(ContainerRegistryEventSource, self).__init__(**kwargs) - self.addr = addr - self.instance_id = instance_id diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target.py deleted file mode 100644 index fd8c0448169c..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the referenced object. - :type media_type: str - :param size: The number of bytes of the content. Same as Length field. - :type size: long - :param digest: The digest of the content, as defined by the Registry V2 - HTTP API Specification. - :type digest: str - :param length: The number of bytes of the content. Same as Size field. - :type length: long - :param repository: The repository name. - :type repository: str - :param url: The direct URL to the content. - :type url: str - :param tag: The tag name. - :type tag: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'length': {'key': 'length', 'type': 'long'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryEventTarget, self).__init__(**kwargs) - self.media_type = kwargs.get('media_type', None) - self.size = kwargs.get('size', None) - self.digest = kwargs.get('digest', None) - self.length = kwargs.get('length', None) - self.repository = kwargs.get('repository', None) - self.url = kwargs.get('url', None) - self.tag = kwargs.get('tag', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target_py3.py deleted file mode 100644 index accbe49f9615..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_event_target_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ContainerRegistryEventTarget(Model): - """The target of the event. - - :param media_type: The MIME type of the referenced object. - :type media_type: str - :param size: The number of bytes of the content. Same as Length field. - :type size: long - :param digest: The digest of the content, as defined by the Registry V2 - HTTP API Specification. - :type digest: str - :param length: The number of bytes of the content. Same as Size field. - :type length: long - :param repository: The repository name. - :type repository: str - :param url: The direct URL to the content. - :type url: str - :param tag: The tag name. - :type tag: str - """ - - _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'long'}, - 'digest': {'key': 'digest', 'type': 'str'}, - 'length': {'key': 'length', 'type': 'long'}, - 'repository': {'key': 'repository', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__(self, *, media_type: str=None, size: int=None, digest: str=None, length: int=None, repository: str=None, url: str=None, tag: str=None, **kwargs) -> None: - super(ContainerRegistryEventTarget, self).__init__(**kwargs) - self.media_type = media_type - self.size = size - self.digest = digest - self.length = length - self.repository = repository - self.url = url - self.tag = tag diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data.py deleted file mode 100644 index 5db3644bb11f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data import ContainerRegistryEventData - - -class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImageDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryImageDeletedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py deleted file mode 100644 index 7365ea5c6a98..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_deleted_event_data_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data_py3 import ContainerRegistryEventData - - -class ContainerRegistryImageDeletedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImageDeleted event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: - super(ContainerRegistryImageDeletedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data.py deleted file mode 100644 index 6ddc5985f4dc..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data import ContainerRegistryEventData - - -class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImagePushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, **kwargs): - super(ContainerRegistryImagePushedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py deleted file mode 100644 index f12aa21fc809..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/container_registry_image_pushed_event_data_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .container_registry_event_data_py3 import ContainerRegistryEventData - - -class ContainerRegistryImagePushedEventData(ContainerRegistryEventData): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ContainerRegistry.ImagePushed event. - - :param id: The event ID. - :type id: str - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param action: The action that encompasses the provided event. - :type action: str - :param target: The target of the event. - :type target: ~azure.eventgrid.models.ContainerRegistryEventTarget - :param request: The request that generated the event. - :type request: ~azure.eventgrid.models.ContainerRegistryEventRequest - :param actor: The agent that initiated the event. For most situations, - this could be from the authorization context of the request. - :type actor: ~azure.eventgrid.models.ContainerRegistryEventActor - :param source: The registry node that generated the event. Put - differently, while the actor initiates the event, the source generates it. - :type source: ~azure.eventgrid.models.ContainerRegistryEventSource - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'ContainerRegistryEventTarget'}, - 'request': {'key': 'request', 'type': 'ContainerRegistryEventRequest'}, - 'actor': {'key': 'actor', 'type': 'ContainerRegistryEventActor'}, - 'source': {'key': 'source', 'type': 'ContainerRegistryEventSource'}, - } - - def __init__(self, *, id: str=None, timestamp=None, action: str=None, target=None, request=None, actor=None, source=None, **kwargs) -> None: - super(ContainerRegistryImagePushedEventData, self).__init__(id=id, timestamp=timestamp, action=action, target=target, request=request, actor=actor, source=source, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py deleted file mode 100644 index 7a110cab64af..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventInfo(Model): - """Information about the device connection state event. - - :param sequence_number: Sequence number is string representation of a - hexadecimal number. string compare can be used to identify the larger - number because both in ASCII and HEX numbers come after alphabets. If you - are converting the string to hex, then the number is a 256 bit number. - :type sequence_number: str - """ - - _attribute_map = { - 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) - self.sequence_number = kwargs.get('sequence_number', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py deleted file mode 100644 index 0ef8c03b2074..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_info_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventInfo(Model): - """Information about the device connection state event. - - :param sequence_number: Sequence number is string representation of a - hexadecimal number. string compare can be used to identify the larger - number because both in ASCII and HEX numbers come after alphabets. If you - are converting the string to hex, then the number is a 256 bit number. - :type sequence_number: str - """ - - _attribute_map = { - 'sequence_number': {'key': 'sequenceNumber', 'type': 'str'}, - } - - def __init__(self, *, sequence_number: str=None, **kwargs) -> None: - super(DeviceConnectionStateEventInfo, self).__init__(**kwargs) - self.sequence_number = sequence_number diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py deleted file mode 100644 index 04a5a1aefcb0..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device connection - state event (DeviceConnected, DeviceDisconnected). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, **kwargs): - super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) - self.device_id = kwargs.get('device_id', None) - self.module_id = kwargs.get('module_id', None) - self.hub_name = kwargs.get('hub_name', None) - self.device_connection_state_event_info = kwargs.get('device_connection_state_event_info', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py deleted file mode 100644 index b8c339e55f64..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_connection_state_event_properties_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceConnectionStateEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device connection - state event (DeviceConnected, DeviceDisconnected). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: - super(DeviceConnectionStateEventProperties, self).__init__(**kwargs) - self.device_id = device_id - self.module_id = module_id - self.hub_name = hub_name - self.device_connection_state_event_info = device_connection_state_event_info diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py deleted file mode 100644 index b6cf0e6f2961..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceLifeCycleEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device life cycle - event (DeviceCreated, DeviceDeleted). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, **kwargs): - super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) - self.device_id = kwargs.get('device_id', None) - self.hub_name = kwargs.get('hub_name', None) - self.twin = kwargs.get('twin', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py deleted file mode 100644 index f203cf9f1005..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_life_cycle_event_properties_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceLifeCycleEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device life cycle - event (DeviceCreated, DeviceDeleted). - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: - super(DeviceLifeCycleEventProperties, self).__init__(**kwargs) - self.device_id = device_id - self.hub_name = hub_name - self.twin = twin diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py deleted file mode 100644 index 5ef54c29c86d..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTelemetryEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device telemetry - event (DeviceTelemetry). - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(DeviceTelemetryEventProperties, self).__init__(**kwargs) - self.body = kwargs.get('body', None) - self.properties = kwargs.get('properties', None) - self.system_properties = kwargs.get('system_properties', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py deleted file mode 100644 index 57fdb9114dc5..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_telemetry_event_properties_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTelemetryEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a device telemetry - event (DeviceTelemetry). - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None: - super(DeviceTelemetryEventProperties, self).__init__(**kwargs) - self.body = body - self.properties = properties - self.system_properties = system_properties diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info.py deleted file mode 100644 index a3c555d320cf..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfo(Model): - """Information about the device twin, which is the cloud representation of - application device metadata. - - :param authentication_type: Authentication type used for this device: - either SAS, SelfSigned, or CertificateAuthority. - :type authentication_type: str - :param cloud_to_device_message_count: Count of cloud to device messages - sent to this device. - :type cloud_to_device_message_count: float - :param connection_state: Whether the device is connected or disconnected. - :type connection_state: str - :param device_id: The unique identifier of the device twin. - :type device_id: str - :param etag: A piece of information that describes the content of the - device twin. Each etag is guaranteed to be unique per device twin. - :type etag: str - :param last_activity_time: The ISO8601 timestamp of the last activity. - :type last_activity_time: str - :param properties: Properties JSON element. - :type properties: ~azure.eventgrid.models.DeviceTwinInfoProperties - :param status: Whether the device twin is enabled or disabled. - :type status: str - :param status_update_time: The ISO8601 timestamp of the last device twin - status update. - :type status_update_time: str - :param version: An integer that is incremented by one each time the device - twin is updated. - :type version: float - :param x509_thumbprint: The thumbprint is a unique value for the x509 - certificate, commonly used to find a particular certificate in a - certificate store. The thumbprint is dynamically generated using the SHA1 - algorithm, and does not physically exist in the certificate. - :type x509_thumbprint: - ~azure.eventgrid.models.DeviceTwinInfoX509Thumbprint - """ - - _attribute_map = { - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, - 'connection_state': {'key': 'connectionState', 'type': 'str'}, - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'float'}, - 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinInfo, self).__init__(**kwargs) - self.authentication_type = kwargs.get('authentication_type', None) - self.cloud_to_device_message_count = kwargs.get('cloud_to_device_message_count', None) - self.connection_state = kwargs.get('connection_state', None) - self.device_id = kwargs.get('device_id', None) - self.etag = kwargs.get('etag', None) - self.last_activity_time = kwargs.get('last_activity_time', None) - self.properties = kwargs.get('properties', None) - self.status = kwargs.get('status', None) - self.status_update_time = kwargs.get('status_update_time', None) - self.version = kwargs.get('version', None) - self.x509_thumbprint = kwargs.get('x509_thumbprint', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties.py deleted file mode 100644 index 707a8bfb287f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoProperties(Model): - """Properties JSON element. - - :param desired: A portion of the properties that can be written only by - the application back-end, and read by the device. - :type desired: ~azure.eventgrid.models.DeviceTwinProperties - :param reported: A portion of the properties that can be written only by - the device, and read by the application back-end. - :type reported: ~azure.eventgrid.models.DeviceTwinProperties - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, - 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinInfoProperties, self).__init__(**kwargs) - self.desired = kwargs.get('desired', None) - self.reported = kwargs.get('reported', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties_py3.py deleted file mode 100644 index efb94dee3d97..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_properties_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoProperties(Model): - """Properties JSON element. - - :param desired: A portion of the properties that can be written only by - the application back-end, and read by the device. - :type desired: ~azure.eventgrid.models.DeviceTwinProperties - :param reported: A portion of the properties that can be written only by - the device, and read by the application back-end. - :type reported: ~azure.eventgrid.models.DeviceTwinProperties - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'DeviceTwinProperties'}, - 'reported': {'key': 'reported', 'type': 'DeviceTwinProperties'}, - } - - def __init__(self, *, desired=None, reported=None, **kwargs) -> None: - super(DeviceTwinInfoProperties, self).__init__(**kwargs) - self.desired = desired - self.reported = reported diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py deleted file mode 100644 index e74f3c65e994..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_py3.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfo(Model): - """Information about the device twin, which is the cloud representation of - application device metadata. - - :param authentication_type: Authentication type used for this device: - either SAS, SelfSigned, or CertificateAuthority. - :type authentication_type: str - :param cloud_to_device_message_count: Count of cloud to device messages - sent to this device. - :type cloud_to_device_message_count: float - :param connection_state: Whether the device is connected or disconnected. - :type connection_state: str - :param device_id: The unique identifier of the device twin. - :type device_id: str - :param etag: A piece of information that describes the content of the - device twin. Each etag is guaranteed to be unique per device twin. - :type etag: str - :param last_activity_time: The ISO8601 timestamp of the last activity. - :type last_activity_time: str - :param properties: Properties JSON element. - :type properties: ~azure.eventgrid.models.DeviceTwinInfoProperties - :param status: Whether the device twin is enabled or disabled. - :type status: str - :param status_update_time: The ISO8601 timestamp of the last device twin - status update. - :type status_update_time: str - :param version: An integer that is incremented by one each time the device - twin is updated. - :type version: float - :param x509_thumbprint: The thumbprint is a unique value for the x509 - certificate, commonly used to find a particular certificate in a - certificate store. The thumbprint is dynamically generated using the SHA1 - algorithm, and does not physically exist in the certificate. - :type x509_thumbprint: - ~azure.eventgrid.models.DeviceTwinInfoX509Thumbprint - """ - - _attribute_map = { - 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, - 'cloud_to_device_message_count': {'key': 'cloudToDeviceMessageCount', 'type': 'float'}, - 'connection_state': {'key': 'connectionState', 'type': 'str'}, - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'last_activity_time': {'key': 'lastActivityTime', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DeviceTwinInfoProperties'}, - 'status': {'key': 'status', 'type': 'str'}, - 'status_update_time': {'key': 'statusUpdateTime', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'float'}, - 'x509_thumbprint': {'key': 'x509Thumbprint', 'type': 'DeviceTwinInfoX509Thumbprint'}, - } - - def __init__(self, *, authentication_type: str=None, cloud_to_device_message_count: float=None, connection_state: str=None, device_id: str=None, etag: str=None, last_activity_time: str=None, properties=None, status: str=None, status_update_time: str=None, version: float=None, x509_thumbprint=None, **kwargs) -> None: - super(DeviceTwinInfo, self).__init__(**kwargs) - self.authentication_type = authentication_type - self.cloud_to_device_message_count = cloud_to_device_message_count - self.connection_state = connection_state - self.device_id = device_id - self.etag = etag - self.last_activity_time = last_activity_time - self.properties = properties - self.status = status - self.status_update_time = status_update_time - self.version = version - self.x509_thumbprint = x509_thumbprint diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint.py deleted file mode 100644 index abeb5e343bfa..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoX509Thumbprint(Model): - """The thumbprint is a unique value for the x509 certificate, commonly used to - find a particular certificate in a certificate store. The thumbprint is - dynamically generated using the SHA1 algorithm, and does not physically - exist in the certificate. - - :param primary_thumbprint: Primary thumbprint for the x509 certificate. - :type primary_thumbprint: str - :param secondary_thumbprint: Secondary thumbprint for the x509 - certificate. - :type secondary_thumbprint: str - """ - - _attribute_map = { - 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, - 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) - self.primary_thumbprint = kwargs.get('primary_thumbprint', None) - self.secondary_thumbprint = kwargs.get('secondary_thumbprint', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint_py3.py deleted file mode 100644 index 8255b523b0ba..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_info_x509_thumbprint_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinInfoX509Thumbprint(Model): - """The thumbprint is a unique value for the x509 certificate, commonly used to - find a particular certificate in a certificate store. The thumbprint is - dynamically generated using the SHA1 algorithm, and does not physically - exist in the certificate. - - :param primary_thumbprint: Primary thumbprint for the x509 certificate. - :type primary_thumbprint: str - :param secondary_thumbprint: Secondary thumbprint for the x509 - certificate. - :type secondary_thumbprint: str - """ - - _attribute_map = { - 'primary_thumbprint': {'key': 'primaryThumbprint', 'type': 'str'}, - 'secondary_thumbprint': {'key': 'secondaryThumbprint', 'type': 'str'}, - } - - def __init__(self, *, primary_thumbprint: str=None, secondary_thumbprint: str=None, **kwargs) -> None: - super(DeviceTwinInfoX509Thumbprint, self).__init__(**kwargs) - self.primary_thumbprint = primary_thumbprint - self.secondary_thumbprint = secondary_thumbprint diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata.py deleted file mode 100644 index 59219bd36fe2..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinMetadata(Model): - """Metadata information for the properties JSON document. - - :param last_updated: The ISO8601 timestamp of the last time the properties - were updated. - :type last_updated: str - """ - - _attribute_map = { - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinMetadata, self).__init__(**kwargs) - self.last_updated = kwargs.get('last_updated', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata_py3.py deleted file mode 100644 index 8abb65fda8e2..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_metadata_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinMetadata(Model): - """Metadata information for the properties JSON document. - - :param last_updated: The ISO8601 timestamp of the last time the properties - were updated. - :type last_updated: str - """ - - _attribute_map = { - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - } - - def __init__(self, *, last_updated: str=None, **kwargs) -> None: - super(DeviceTwinMetadata, self).__init__(**kwargs) - self.last_updated = last_updated diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties.py deleted file mode 100644 index 9b207d5868ed..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinProperties(Model): - """A portion of the properties that can be written only by the application - back-end, and read by the device. - - :param metadata: Metadata information for the properties JSON document. - :type metadata: ~azure.eventgrid.models.DeviceTwinMetadata - :param version: Version of device twin properties. - :type version: float - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, - 'version': {'key': 'version', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(DeviceTwinProperties, self).__init__(**kwargs) - self.metadata = kwargs.get('metadata', None) - self.version = kwargs.get('version', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties_py3.py deleted file mode 100644 index d28f52af8f84..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/device_twin_properties_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class DeviceTwinProperties(Model): - """A portion of the properties that can be written only by the application - back-end, and read by the device. - - :param metadata: Metadata information for the properties JSON document. - :type metadata: ~azure.eventgrid.models.DeviceTwinMetadata - :param version: Version of device twin properties. - :type version: float - """ - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'DeviceTwinMetadata'}, - 'version': {'key': 'version', 'type': 'float'}, - } - - def __init__(self, *, metadata=None, version: float=None, **kwargs) -> None: - super(DeviceTwinProperties, self).__init__(**kwargs) - self.metadata = metadata - self.version = version diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event.py deleted file mode 100644 index f4828c24dd38..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventGridEvent(Model): - """Properties of an event published to an Event Grid topic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. An unique identifier for the event. - :type id: str - :param topic: The resource path of the event source. - :type topic: str - :param subject: Required. A resource path relative to the topic path. - :type subject: str - :param data: Required. Event data specific to the event type. - :type data: object - :param event_type: Required. The type of the event that occurred. - :type event_type: str - :param event_time: Required. The time (in UTC) the event was generated. - :type event_time: datetime - :ivar metadata_version: The schema version of the event metadata. - :vartype metadata_version: str - :param data_version: Required. The schema version of the data object. - :type data_version: str - """ - - _validation = { - 'id': {'required': True}, - 'subject': {'required': True}, - 'data': {'required': True}, - 'event_type': {'required': True}, - 'event_time': {'required': True}, - 'metadata_version': {'readonly': True}, - 'data_version': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'topic': {'key': 'topic', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'object'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, - 'data_version': {'key': 'dataVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventGridEvent, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.topic = kwargs.get('topic', None) - self.subject = kwargs.get('subject', None) - self.data = kwargs.get('data', None) - self.event_type = kwargs.get('event_type', None) - self.event_time = kwargs.get('event_time', None) - self.metadata_version = None - self.data_version = kwargs.get('data_version', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event_py3.py deleted file mode 100644 index 1f54ddad918a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_grid_event_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventGridEvent(Model): - """Properties of an event published to an Event Grid topic. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. An unique identifier for the event. - :type id: str - :param topic: The resource path of the event source. - :type topic: str - :param subject: Required. A resource path relative to the topic path. - :type subject: str - :param data: Required. Event data specific to the event type. - :type data: object - :param event_type: Required. The type of the event that occurred. - :type event_type: str - :param event_time: Required. The time (in UTC) the event was generated. - :type event_time: datetime - :ivar metadata_version: The schema version of the event metadata. - :vartype metadata_version: str - :param data_version: Required. The schema version of the data object. - :type data_version: str - """ - - _validation = { - 'id': {'required': True}, - 'subject': {'required': True}, - 'data': {'required': True}, - 'event_type': {'required': True}, - 'event_time': {'required': True}, - 'metadata_version': {'readonly': True}, - 'data_version': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'topic': {'key': 'topic', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'object'}, - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'metadata_version': {'key': 'metadataVersion', 'type': 'str'}, - 'data_version': {'key': 'dataVersion', 'type': 'str'}, - } - - def __init__(self, *, id: str, subject: str, data, event_type: str, event_time, data_version: str, topic: str=None, **kwargs) -> None: - super(EventGridEvent, self).__init__(**kwargs) - self.id = id - self.topic = topic - self.subject = subject - self.data = data - self.event_type = event_type - self.event_time = event_time - self.metadata_version = None - self.data_version = data_version diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data.py deleted file mode 100644 index 7cca05430f96..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubCaptureFileCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.EventHub.CaptureFileCreated event. - - :param fileurl: The path to the capture file. - :type fileurl: str - :param file_type: The file type of the capture file. - :type file_type: str - :param partition_id: The shard ID. - :type partition_id: str - :param size_in_bytes: The file size. - :type size_in_bytes: int - :param event_count: The number of events in the file. - :type event_count: int - :param first_sequence_number: The smallest sequence number from the queue. - :type first_sequence_number: int - :param last_sequence_number: The last sequence number from the queue. - :type last_sequence_number: int - :param first_enqueue_time: The first time from the queue. - :type first_enqueue_time: datetime - :param last_enqueue_time: The last time from the queue. - :type last_enqueue_time: datetime - """ - - _attribute_map = { - 'fileurl': {'key': 'fileurl', 'type': 'str'}, - 'file_type': {'key': 'fileType', 'type': 'str'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, - 'event_count': {'key': 'eventCount', 'type': 'int'}, - 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, - 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, - 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, - 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) - self.fileurl = kwargs.get('fileurl', None) - self.file_type = kwargs.get('file_type', None) - self.partition_id = kwargs.get('partition_id', None) - self.size_in_bytes = kwargs.get('size_in_bytes', None) - self.event_count = kwargs.get('event_count', None) - self.first_sequence_number = kwargs.get('first_sequence_number', None) - self.last_sequence_number = kwargs.get('last_sequence_number', None) - self.first_enqueue_time = kwargs.get('first_enqueue_time', None) - self.last_enqueue_time = kwargs.get('last_enqueue_time', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data_py3.py deleted file mode 100644 index 673a61b031e9..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/event_hub_capture_file_created_event_data_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubCaptureFileCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.EventHub.CaptureFileCreated event. - - :param fileurl: The path to the capture file. - :type fileurl: str - :param file_type: The file type of the capture file. - :type file_type: str - :param partition_id: The shard ID. - :type partition_id: str - :param size_in_bytes: The file size. - :type size_in_bytes: int - :param event_count: The number of events in the file. - :type event_count: int - :param first_sequence_number: The smallest sequence number from the queue. - :type first_sequence_number: int - :param last_sequence_number: The last sequence number from the queue. - :type last_sequence_number: int - :param first_enqueue_time: The first time from the queue. - :type first_enqueue_time: datetime - :param last_enqueue_time: The last time from the queue. - :type last_enqueue_time: datetime - """ - - _attribute_map = { - 'fileurl': {'key': 'fileurl', 'type': 'str'}, - 'file_type': {'key': 'fileType', 'type': 'str'}, - 'partition_id': {'key': 'partitionId', 'type': 'str'}, - 'size_in_bytes': {'key': 'sizeInBytes', 'type': 'int'}, - 'event_count': {'key': 'eventCount', 'type': 'int'}, - 'first_sequence_number': {'key': 'firstSequenceNumber', 'type': 'int'}, - 'last_sequence_number': {'key': 'lastSequenceNumber', 'type': 'int'}, - 'first_enqueue_time': {'key': 'firstEnqueueTime', 'type': 'iso-8601'}, - 'last_enqueue_time': {'key': 'lastEnqueueTime', 'type': 'iso-8601'}, - } - - def __init__(self, *, fileurl: str=None, file_type: str=None, partition_id: str=None, size_in_bytes: int=None, event_count: int=None, first_sequence_number: int=None, last_sequence_number: int=None, first_enqueue_time=None, last_enqueue_time=None, **kwargs) -> None: - super(EventHubCaptureFileCreatedEventData, self).__init__(**kwargs) - self.fileurl = fileurl - self.file_type = file_type - self.partition_id = partition_id - self.size_in_bytes = size_in_bytes - self.event_count = event_count - self.first_sequence_number = first_sequence_number - self.last_sequence_number = last_sequence_number - self.first_enqueue_time = first_enqueue_time - self.last_enqueue_time = last_enqueue_time diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py deleted file mode 100644 index 9f48f9c10abc..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties import DeviceConnectionStateEventProperties - - -class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceConnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceConnectedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py deleted file mode 100644 index 3c4791507b54..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_connected_event_data_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties - - -class IotHubDeviceConnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceConnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: - super(IotHubDeviceConnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py deleted file mode 100644 index df911f0b0456..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties - - -class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceCreated event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceCreatedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py deleted file mode 100644 index e8d497edc97e..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_created_event_data_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties - - -class IotHubDeviceCreatedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceCreated event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: - super(IotHubDeviceCreatedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py deleted file mode 100644 index 92d7e5c9c67f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties import DeviceLifeCycleEventProperties - - -class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceDeleted event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceDeletedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py deleted file mode 100644 index 635003d7176c..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_deleted_event_data_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_life_cycle_event_properties_py3 import DeviceLifeCycleEventProperties - - -class IotHubDeviceDeletedEventData(DeviceLifeCycleEventProperties): - """Event data for Microsoft.Devices.DeviceDeleted event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param twin: Information about the device twin, which is the cloud - representation of application device metadata. - :type twin: ~azure.eventgrid.models.DeviceTwinInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'twin': {'key': 'twin', 'type': 'DeviceTwinInfo'}, - } - - def __init__(self, *, device_id: str=None, hub_name: str=None, twin=None, **kwargs) -> None: - super(IotHubDeviceDeletedEventData, self).__init__(device_id=device_id, hub_name=hub_name, twin=twin, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py deleted file mode 100644 index 0de85a3a601f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties import DeviceConnectionStateEventProperties - - -class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceDisconnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceDisconnectedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py deleted file mode 100644 index d340d625e90c..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_disconnected_event_data_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_connection_state_event_properties_py3 import DeviceConnectionStateEventProperties - - -class IotHubDeviceDisconnectedEventData(DeviceConnectionStateEventProperties): - """Event data for Microsoft.Devices.DeviceDisconnected event. - - :param device_id: The unique identifier of the device. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type device_id: str - :param module_id: The unique identifier of the module. This case-sensitive - string can be up to 128 characters long, and supports ASCII 7-bit - alphanumeric characters plus the following special characters: - : . + % _ - # * ? ! ( ) , = @ ; $ '. - :type module_id: str - :param hub_name: Name of the IoT Hub where the device was created or - deleted. - :type hub_name: str - :param device_connection_state_event_info: Information about the device - connection state event. - :type device_connection_state_event_info: - ~azure.eventgrid.models.DeviceConnectionStateEventInfo - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'module_id': {'key': 'moduleId', 'type': 'str'}, - 'hub_name': {'key': 'hubName', 'type': 'str'}, - 'device_connection_state_event_info': {'key': 'deviceConnectionStateEventInfo', 'type': 'DeviceConnectionStateEventInfo'}, - } - - def __init__(self, *, device_id: str=None, module_id: str=None, hub_name: str=None, device_connection_state_event_info=None, **kwargs) -> None: - super(IotHubDeviceDisconnectedEventData, self).__init__(device_id=device_id, module_id=module_id, hub_name=hub_name, device_connection_state_event_info=device_connection_state_event_info, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py deleted file mode 100644 index 68327f110245..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_telemetry_event_properties import DeviceTelemetryEventProperties - - -class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): - """Event data for Microsoft.Devices.DeviceTelemetry event. - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(IotHubDeviceTelemetryEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py deleted file mode 100644 index 99ff68ce2594..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/iot_hub_device_telemetry_event_data_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .device_telemetry_event_properties_py3 import DeviceTelemetryEventProperties - - -class IotHubDeviceTelemetryEventData(DeviceTelemetryEventProperties): - """Event data for Microsoft.Devices.DeviceTelemetry event. - - :param body: The content of the message from the device. - :type body: object - :param properties: Application properties are user-defined strings that - can be added to the message. These fields are optional. - :type properties: dict[str, str] - :param system_properties: System properties help identify contents and - source of the messages. - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, *, body=None, properties=None, system_properties=None, **kwargs) -> None: - super(IotHubDeviceTelemetryEventData, self).__init__(body=body, properties=properties, system_properties=system_properties, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data.py deleted file mode 100644 index ad261166eab6..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties import MapsGeofenceEventProperties - - -class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceEntered event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceEnteredEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data_py3.py deleted file mode 100644 index 4a49e99df5ab..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_entered_event_data_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - - -class MapsGeofenceEnteredEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceEntered event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceEnteredEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties.py deleted file mode 100644 index a09219f411ca..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a Geofence event - (GeofenceEntered, GeofenceExited, GeofenceResult). - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceEventProperties, self).__init__(**kwargs) - self.expired_geofence_geometry_id = kwargs.get('expired_geofence_geometry_id', None) - self.geometries = kwargs.get('geometries', None) - self.invalid_period_geofence_geometry_id = kwargs.get('invalid_period_geofence_geometry_id', None) - self.is_event_published = kwargs.get('is_event_published', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties_py3.py deleted file mode 100644 index aaf8b3a60c08..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_event_properties_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceEventProperties(Model): - """Schema of the Data property of an EventGridEvent for a Geofence event - (GeofenceEntered, GeofenceExited, GeofenceResult). - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceEventProperties, self).__init__(**kwargs) - self.expired_geofence_geometry_id = expired_geofence_geometry_id - self.geometries = geometries - self.invalid_period_geofence_geometry_id = invalid_period_geofence_geometry_id - self.is_event_published = is_event_published diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data.py deleted file mode 100644 index f7c5aa0fc15a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties import MapsGeofenceEventProperties - - -class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceExited event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceExitedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data_py3.py deleted file mode 100644 index 6bec05c2212f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_exited_event_data_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - - -class MapsGeofenceExitedEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceExited event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceExitedEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py deleted file mode 100644 index b7cff8da378a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceGeometry(Model): - """The geofence geometry. - - :param device_id: ID of the device. - :type device_id: str - :param distance: Distance from the coordinate to the closest border of the - geofence. Positive means the coordinate is outside of the geofence. If the - coordinate is outside of the geofence, but more than the value of - searchBuffer away from the closest geofence border, then the value is 999. - Negative means the coordinate is inside of the geofence. If the coordinate - is inside the polygon, but more than the value of searchBuffer away from - the closest geofencing border,then the value is -999. A value of 999 means - that there is great confidence the coordinate is well outside the - geofence. A value of -999 means that there is great confidence the - coordinate is well within the geofence. - :type distance: float - :param geometry_id: The unique ID for the geofence geometry. - :type geometry_id: str - :param nearest_lat: Latitude of the nearest point of the geometry. - :type nearest_lat: float - :param nearest_lon: Longitude of the nearest point of the geometry. - :type nearest_lon: float - :param ud_id: The unique id returned from user upload service when - uploading a geofence. Will not be included in geofencing post API. - :type ud_id: str - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'distance': {'key': 'distance', 'type': 'float'}, - 'geometry_id': {'key': 'geometryId', 'type': 'str'}, - 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, - 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, - 'ud_id': {'key': 'udId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceGeometry, self).__init__(**kwargs) - self.device_id = kwargs.get('device_id', None) - self.distance = kwargs.get('distance', None) - self.geometry_id = kwargs.get('geometry_id', None) - self.nearest_lat = kwargs.get('nearest_lat', None) - self.nearest_lon = kwargs.get('nearest_lon', None) - self.ud_id = kwargs.get('ud_id', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry_py3.py deleted file mode 100644 index bd6690005053..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_geometry_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MapsGeofenceGeometry(Model): - """The geofence geometry. - - :param device_id: ID of the device. - :type device_id: str - :param distance: Distance from the coordinate to the closest border of the - geofence. Positive means the coordinate is outside of the geofence. If the - coordinate is outside of the geofence, but more than the value of - searchBuffer away from the closest geofence border, then the value is 999. - Negative means the coordinate is inside of the geofence. If the coordinate - is inside the polygon, but more than the value of searchBuffer away from - the closest geofencing border,then the value is -999. A value of 999 means - that there is great confidence the coordinate is well outside the - geofence. A value of -999 means that there is great confidence the - coordinate is well within the geofence. - :type distance: float - :param geometry_id: The unique ID for the geofence geometry. - :type geometry_id: str - :param nearest_lat: Latitude of the nearest point of the geometry. - :type nearest_lat: float - :param nearest_lon: Longitude of the nearest point of the geometry. - :type nearest_lon: float - :param ud_id: The unique id returned from user upload service when - uploading a geofence. Will not be included in geofencing post API. - :type ud_id: str - """ - - _attribute_map = { - 'device_id': {'key': 'deviceId', 'type': 'str'}, - 'distance': {'key': 'distance', 'type': 'float'}, - 'geometry_id': {'key': 'geometryId', 'type': 'str'}, - 'nearest_lat': {'key': 'nearestLat', 'type': 'float'}, - 'nearest_lon': {'key': 'nearestLon', 'type': 'float'}, - 'ud_id': {'key': 'udId', 'type': 'str'}, - } - - def __init__(self, *, device_id: str=None, distance: float=None, geometry_id: str=None, nearest_lat: float=None, nearest_lon: float=None, ud_id: str=None, **kwargs) -> None: - super(MapsGeofenceGeometry, self).__init__(**kwargs) - self.device_id = device_id - self.distance = distance - self.geometry_id = geometry_id - self.nearest_lat = nearest_lat - self.nearest_lon = nearest_lon - self.ud_id = ud_id diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data.py deleted file mode 100644 index a609225c822e..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties import MapsGeofenceEventProperties - - -class MapsGeofenceResultEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceResult event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MapsGeofenceResultEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data_py3.py deleted file mode 100644 index 24a1bebf7180..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/maps_geofence_result_event_data_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .maps_geofence_event_properties_py3 import MapsGeofenceEventProperties - - -class MapsGeofenceResultEventData(MapsGeofenceEventProperties): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Maps.GeofenceResult event. - - :param expired_geofence_geometry_id: Lists of the geometry ID of the - geofence which is expired relative to the user time in the request. - :type expired_geofence_geometry_id: list[str] - :param geometries: Lists the fence geometries that either fully contain - the coordinate position or have an overlap with the searchBuffer around - the fence. - :type geometries: list[~azure.eventgrid.models.MapsGeofenceGeometry] - :param invalid_period_geofence_geometry_id: Lists of the geometry ID of - the geofence which is in invalid period relative to the user time in the - request. - :type invalid_period_geofence_geometry_id: list[str] - :param is_event_published: True if at least one event is published to the - Azure Maps event subscriber, false if no event is published to the Azure - Maps event subscriber. - :type is_event_published: bool - """ - - _attribute_map = { - 'expired_geofence_geometry_id': {'key': 'expiredGeofenceGeometryId', 'type': '[str]'}, - 'geometries': {'key': 'geometries', 'type': '[MapsGeofenceGeometry]'}, - 'invalid_period_geofence_geometry_id': {'key': 'invalidPeriodGeofenceGeometryId', 'type': '[str]'}, - 'is_event_published': {'key': 'isEventPublished', 'type': 'bool'}, - } - - def __init__(self, *, expired_geofence_geometry_id=None, geometries=None, invalid_period_geofence_geometry_id=None, is_event_published: bool=None, **kwargs) -> None: - super(MapsGeofenceResultEventData, self).__init__(expired_geofence_geometry_id=expired_geofence_geometry_id, geometries=geometries, invalid_period_geofence_geometry_id=invalid_period_geofence_geometry_id, is_event_published=is_event_published, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data.py deleted file mode 100644 index f8a820f2b8fb..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobCanceledEventData(MediaJobStateChangeEventData): - """Job canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, **kwargs): - super(MediaJobCanceledEventData, self).__init__(**kwargs) - self.outputs = kwargs.get('outputs', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data_py3.py deleted file mode 100644 index 2febfeb9d2d5..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceled_event_data_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobCanceledEventData(MediaJobStateChangeEventData): - """Job canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: - super(MediaJobCanceledEventData, self).__init__(correlation_data=correlation_data, **kwargs) - self.outputs = outputs diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data.py deleted file mode 100644 index 4c25c6c2cae9..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobCancelingEventData(MediaJobStateChangeEventData): - """Job canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobCancelingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data_py3.py deleted file mode 100644 index 1ed04a59b0c5..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_canceling_event_data_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobCancelingEventData(MediaJobStateChangeEventData): - """Job canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobCancelingEventData, self).__init__(correlation_data=correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error.py deleted file mode 100644 index 2a4c16b33889..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobError(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code describing the error. Possible values include: - 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', - 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', - 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' - :vartype code: str or ~azure.eventgrid.models.MediaJobErrorCode - :ivar message: A human-readable language-dependent representation of the - error. - :vartype message: str - :ivar category: Helps with categorization of errors. Possible values - include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' - :vartype category: str or ~azure.eventgrid.models.MediaJobErrorCategory - :ivar retry: Indicates that it may be possible to retry the Job. If retry - is unsuccessful, please contact Azure support via Azure Portal. Possible - values include: 'DoNotRetry', 'MayRetry' - :vartype retry: str or ~azure.eventgrid.models.MediaJobRetry - :ivar details: An array of details about specific errors that led to this - reported error. - :vartype details: list[~azure.eventgrid.models.MediaJobErrorDetail] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'category': {'readonly': True}, - 'retry': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'MediaJobErrorCode'}, - 'message': {'key': 'message', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'MediaJobErrorCategory'}, - 'retry': {'key': 'retry', 'type': 'MediaJobRetry'}, - 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, - } - - def __init__(self, **kwargs): - super(MediaJobError, self).__init__(**kwargs) - self.code = None - self.message = None - self.category = None - self.retry = None - self.details = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail.py deleted file mode 100644 index acbb98e6c437..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobErrorDetail(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code describing the error detail. - :vartype code: str - :ivar message: A human-readable representation of the error. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaJobErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail_py3.py deleted file mode 100644 index 9c419b996add..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_detail_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobErrorDetail(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Code describing the error detail. - :vartype code: str - :ivar message: A human-readable representation of the error. - :vartype message: str - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaJobErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_py3.py deleted file mode 100644 index afd055ba62ec..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_error_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobError(Model): - """Details of JobOutput errors. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: Error code describing the error. Possible values include: - 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', - 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', - 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' - :vartype code: str or ~azure.eventgrid.models.MediaJobErrorCode - :ivar message: A human-readable language-dependent representation of the - error. - :vartype message: str - :ivar category: Helps with categorization of errors. Possible values - include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' - :vartype category: str or ~azure.eventgrid.models.MediaJobErrorCategory - :ivar retry: Indicates that it may be possible to retry the Job. If retry - is unsuccessful, please contact Azure support via Azure Portal. Possible - values include: 'DoNotRetry', 'MayRetry' - :vartype retry: str or ~azure.eventgrid.models.MediaJobRetry - :ivar details: An array of details about specific errors that led to this - reported error. - :vartype details: list[~azure.eventgrid.models.MediaJobErrorDetail] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'category': {'readonly': True}, - 'retry': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'MediaJobErrorCode'}, - 'message': {'key': 'message', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'MediaJobErrorCategory'}, - 'retry': {'key': 'retry', 'type': 'MediaJobRetry'}, - 'details': {'key': 'details', 'type': '[MediaJobErrorDetail]'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaJobError, self).__init__(**kwargs) - self.code = None - self.message = None - self.category = None - self.retry = None - self.details = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data.py deleted file mode 100644 index 91b5cda1eeec..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobErroredEventData(MediaJobStateChangeEventData): - """Job error state event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, **kwargs): - super(MediaJobErroredEventData, self).__init__(**kwargs) - self.outputs = kwargs.get('outputs', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data_py3.py deleted file mode 100644 index 2a2e7b7af094..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_errored_event_data_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobErroredEventData(MediaJobStateChangeEventData): - """Job error state event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: - super(MediaJobErroredEventData, self).__init__(correlation_data=correlation_data, **kwargs) - self.outputs = outputs diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data.py deleted file mode 100644 index 29d2f2a1420e..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobFinishedEventData(MediaJobStateChangeEventData): - """Job finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, **kwargs): - super(MediaJobFinishedEventData, self).__init__(**kwargs) - self.outputs = kwargs.get('outputs', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data_py3.py deleted file mode 100644 index 9e9ee8d588c0..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_finished_event_data_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobFinishedEventData(MediaJobStateChangeEventData): - """Job finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - :param outputs: Gets the Job outputs. - :type outputs: list[~azure.eventgrid.models.MediaJobOutput] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '[MediaJobOutput]'}, - } - - def __init__(self, *, correlation_data=None, outputs=None, **kwargs) -> None: - super(MediaJobFinishedEventData, self).__init__(correlation_data=correlation_data, **kwargs) - self.outputs = outputs diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py deleted file mode 100644 index ec105fd697dd..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutput(Model): - """The event data for a Job output. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MediaJobOutputAsset - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} - } - - def __init__(self, **kwargs): - super(MediaJobOutput, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - self.label = kwargs.get('label', None) - self.progress = kwargs.get('progress', None) - self.state = kwargs.get('state', None) - self.odatatype = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset.py deleted file mode 100644 index efe51ce529f5..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output import MediaJobOutput - - -class MediaJobOutputAsset(MediaJobOutput): - """The event data for a Job output asset. - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param asset_name: Gets the Job output asset name. - :type asset_name: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'asset_name': {'key': 'assetName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputAsset, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.odatatype = '#Microsoft.Media.JobOutputAsset' diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset_py3.py deleted file mode 100644 index de6fc83d47c8..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_asset_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_py3 import MediaJobOutput - - -class MediaJobOutputAsset(MediaJobOutput): - """The event data for a Job output asset. - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - :param asset_name: Gets the Job output asset name. - :type asset_name: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - 'asset_name': {'key': 'assetName', 'type': 'str'}, - } - - def __init__(self, *, progress: int, state, error=None, label: str=None, asset_name: str=None, **kwargs) -> None: - super(MediaJobOutputAsset, self).__init__(error=error, label=label, progress=progress, state=state, **kwargs) - self.asset_name = asset_name - self.odatatype = '#Microsoft.Media.JobOutputAsset' diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data.py deleted file mode 100644 index c082ca91470f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): - """Job output canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputCanceledEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data_py3.py deleted file mode 100644 index 07fe3029aeb5..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceled_event_data_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCanceledEventData(MediaJobOutputStateChangeEventData): - """Job output canceled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputCanceledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data.py deleted file mode 100644 index 5b8f61dc1432..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): - """Job output canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputCancelingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data_py3.py deleted file mode 100644 index 440bb91f08f4..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_canceling_event_data_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputCancelingEventData(MediaJobOutputStateChangeEventData): - """Job output canceling event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputCancelingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data.py deleted file mode 100644 index b6e9bf9f4bf0..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): - """Job output error event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputErroredEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data_py3.py deleted file mode 100644 index c6f8c6ed5eb2..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_errored_event_data_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputErroredEventData(MediaJobOutputStateChangeEventData): - """Job output error event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputErroredEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data.py deleted file mode 100644 index ad08587a4d2a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): - """Job output finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputFinishedEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data_py3.py deleted file mode 100644 index d973441dfb22..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_finished_event_data_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputFinishedEventData(MediaJobOutputStateChangeEventData): - """Job output finished event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputFinishedEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data.py deleted file mode 100644 index 40bc09600888..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): - """Job output processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputProcessingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data_py3.py deleted file mode 100644 index ccf97c3470ec..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_processing_event_data_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputProcessingEventData(MediaJobOutputStateChangeEventData): - """Job output processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputProcessingEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data.py deleted file mode 100644 index 37c2c9662421..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputProgressEventData(Model): - """Job Output Progress Event Data. - - :param label: Gets the Job output label. - :type label: str - :param progress: Gets the Job output progress. - :type progress: long - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputProgressEventData, self).__init__(**kwargs) - self.label = kwargs.get('label', None) - self.progress = kwargs.get('progress', None) - self.job_correlation_data = kwargs.get('job_correlation_data', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data_py3.py deleted file mode 100644 index 3f23816b7c37..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_progress_event_data_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputProgressEventData(Model): - """Job Output Progress Event Data. - - :param label: Gets the Job output label. - :type label: str - :param progress: Gets the Job output progress. - :type progress: long - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _attribute_map = { - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, label: str=None, progress: int=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputProgressEventData, self).__init__(**kwargs) - self.label = label - self.progress = progress - self.job_correlation_data = job_correlation_data diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_py3.py deleted file mode 100644 index 8be196363b90..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutput(Model): - """The event data for a Job output. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MediaJobOutputAsset - - All required parameters must be populated in order to send to Azure. - - :param error: Gets the Job output error. - :type error: ~azure.eventgrid.models.MediaJobError - :param label: Gets the Job output label. - :type label: str - :param progress: Required. Gets the Job output progress. - :type progress: long - :param state: Required. Gets the Job output state. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :type state: str or ~azure.eventgrid.models.MediaJobState - :param odatatype: Required. Constant filled by server. - :type odatatype: str - """ - - _validation = { - 'progress': {'required': True}, - 'state': {'required': True}, - 'odatatype': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'MediaJobError'}, - 'label': {'key': 'label', 'type': 'str'}, - 'progress': {'key': 'progress', 'type': 'long'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odatatype': {'#Microsoft.Media.JobOutputAsset': 'MediaJobOutputAsset'} - } - - def __init__(self, *, progress: int, state, error=None, label: str=None, **kwargs) -> None: - super(MediaJobOutput, self).__init__(**kwargs) - self.error = error - self.label = label - self.progress = progress - self.state = state - self.odatatype = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data.py deleted file mode 100644 index add4742a19e3..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data import MediaJobOutputStateChangeEventData - - -class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): - """Job output scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputScheduledEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data_py3.py deleted file mode 100644 index a0ebd525de32..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_scheduled_event_data_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_output_state_change_event_data_py3 import MediaJobOutputStateChangeEventData - - -class MediaJobOutputScheduledEventData(MediaJobOutputStateChangeEventData): - """Job output scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputScheduledEventData, self).__init__(output=output, job_correlation_data=job_correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data.py deleted file mode 100644 index f60b5b944a15..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobOutputStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.output = kwargs.get('output', None) - self.job_correlation_data = kwargs.get('job_correlation_data', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data_py3.py deleted file mode 100644 index 7c66b5dde9df..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_output_state_change_event_data_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobOutputStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobOutputStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :param output: Gets the output. - :type output: ~azure.eventgrid.models.MediaJobOutput - :param job_correlation_data: Gets the Job correlation data. - :type job_correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'output': {'key': 'output', 'type': 'MediaJobOutput'}, - 'job_correlation_data': {'key': 'jobCorrelationData', 'type': '{str}'}, - } - - def __init__(self, *, output=None, job_correlation_data=None, **kwargs) -> None: - super(MediaJobOutputStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.output = output - self.job_correlation_data = job_correlation_data diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data.py deleted file mode 100644 index 9723cb17d9c5..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobProcessingEventData(MediaJobStateChangeEventData): - """Job processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobProcessingEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data_py3.py deleted file mode 100644 index 6fa5a6bada00..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_processing_event_data_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobProcessingEventData(MediaJobStateChangeEventData): - """Job processing event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobProcessingEventData, self).__init__(correlation_data=correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data.py deleted file mode 100644 index e7f3ac435b4b..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data import MediaJobStateChangeEventData - - -class MediaJobScheduledEventData(MediaJobStateChangeEventData): - """Job scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobScheduledEventData, self).__init__(**kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data_py3.py deleted file mode 100644 index a48b518f50d7..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_scheduled_event_data_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .media_job_state_change_event_data_py3 import MediaJobStateChangeEventData - - -class MediaJobScheduledEventData(MediaJobStateChangeEventData): - """Job scheduled event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobScheduledEventData, self).__init__(correlation_data=correlation_data, **kwargs) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py deleted file mode 100644 index 180cc78a98fa..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(MediaJobStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.state = None - self.correlation_data = kwargs.get('correlation_data', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py deleted file mode 100644 index 669d790a1843..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_job_state_change_event_data_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaJobStateChangeEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Media.JobStateChange event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar previous_state: The previous state of the Job. Possible values - include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - 'Queued', 'Scheduled' - :vartype previous_state: str or ~azure.eventgrid.models.MediaJobState - :ivar state: The new state of the Job. Possible values include: - 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', - 'Scheduled' - :vartype state: str or ~azure.eventgrid.models.MediaJobState - :param correlation_data: Gets the Job correlation data. - :type correlation_data: dict[str, str] - """ - - _validation = { - 'previous_state': {'readonly': True}, - 'state': {'readonly': True}, - } - - _attribute_map = { - 'previous_state': {'key': 'previousState', 'type': 'MediaJobState'}, - 'state': {'key': 'state', 'type': 'MediaJobState'}, - 'correlation_data': {'key': 'correlationData', 'type': '{str}'}, - } - - def __init__(self, *, correlation_data=None, **kwargs) -> None: - super(MediaJobStateChangeEventData, self).__init__(**kwargs) - self.previous_state = None - self.state = None - self.correlation_data = correlation_data diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py deleted file mode 100644 index 76a49ae592bd..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventConnectionRejectedEventData(Model): - """Encoder connection rejected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data_py3.py deleted file mode 100644 index 3727fde97d6b..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_connection_rejected_event_data_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventConnectionRejectedEventData(Model): - """Encoder connection rejected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventConnectionRejectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data.py deleted file mode 100644 index 8b89a722d117..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderConnectedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data_py3.py deleted file mode 100644 index 64d9148ba712..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_connected_event_data_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderConnectedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventEncoderConnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data.py deleted file mode 100644 index 8fd787e6ebfa..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderDisconnectedEventData(Model): - """Encoder disconnected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data_py3.py deleted file mode 100644 index 14df222bddac..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_encoder_disconnected_event_data_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventEncoderDisconnectedEventData(Model): - """Encoder disconnected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar stream_id: Gets the stream Id. - :vartype stream_id: str - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar result_code: Gets the result code. - :vartype result_code: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'stream_id': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'result_code': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'stream_id': {'key': 'streamId', 'type': 'str'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventEncoderDisconnectedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.stream_id = None - self.encoder_ip = None - self.encoder_port = None - self.result_code = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data.py deleted file mode 100644 index 6210002346cd..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingDataChunkDroppedEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Gets the timestamp of the data chunk dropped. - :vartype timestamp: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar timescale: Gets the timescale of the Timestamp. - :vartype timescale: str - :ivar result_code: Gets the result code for fragment drop operation. - :vartype result_code: str - :ivar track_name: Gets the name of the track for which fragment is - dropped. - :vartype track_name: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'track_type': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'timescale': {'readonly': True}, - 'result_code': {'readonly': True}, - 'track_name': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) - self.timestamp = None - self.track_type = None - self.bitrate = None - self.timescale = None - self.result_code = None - self.track_name = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data_py3.py deleted file mode 100644 index 00fed549af42..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_data_chunk_dropped_event_data_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingDataChunkDroppedEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar timestamp: Gets the timestamp of the data chunk dropped. - :vartype timestamp: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar timescale: Gets the timescale of the Timestamp. - :vartype timescale: str - :ivar result_code: Gets the result code for fragment drop operation. - :vartype result_code: str - :ivar track_name: Gets the name of the track for which fragment is - dropped. - :vartype track_name: str - """ - - _validation = { - 'timestamp': {'readonly': True}, - 'track_type': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'timescale': {'readonly': True}, - 'result_code': {'readonly': True}, - 'track_name': {'readonly': True}, - } - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingDataChunkDroppedEventData, self).__init__(**kwargs) - self.timestamp = None - self.track_type = None - self.bitrate = None - self.timescale = None - self.result_code = None - self.track_name = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data.py deleted file mode 100644 index 756218ad5856..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamReceivedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar timestamp: Gets the first timestamp of the data chunk received. - :vartype timestamp: str - :ivar duration: Gets the duration of the first data chunk. - :vartype duration: str - :ivar timescale: Gets the timescale in which timestamp is represented. - :vartype timescale: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.track_type = None - self.track_name = None - self.bitrate = None - self.encoder_ip = None - self.encoder_port = None - self.timestamp = None - self.duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data_py3.py deleted file mode 100644 index 928dfc666158..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_stream_received_event_data_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamReceivedEventData(Model): - """Encoder connect event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar ingest_url: Gets the ingest URL provided by the live event. - :vartype ingest_url: str - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar encoder_ip: Gets the remote IP. - :vartype encoder_ip: str - :ivar encoder_port: Gets the remote port. - :vartype encoder_port: str - :ivar timestamp: Gets the first timestamp of the data chunk received. - :vartype timestamp: str - :ivar duration: Gets the duration of the first data chunk. - :vartype duration: str - :ivar timescale: Gets the timescale in which timestamp is represented. - :vartype timescale: str - """ - - _validation = { - 'ingest_url': {'readonly': True}, - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'encoder_ip': {'readonly': True}, - 'encoder_port': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'ingest_url': {'key': 'ingestUrl', 'type': 'str'}, - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'encoder_ip': {'key': 'encoderIp', 'type': 'str'}, - 'encoder_port': {'key': 'encoderPort', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingStreamReceivedEventData, self).__init__(**kwargs) - self.ingest_url = None - self.track_type = None - self.track_name = None - self.bitrate = None - self.encoder_ip = None - self.encoder_port = None - self.timestamp = None - self.duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data.py deleted file mode 100644 index c0fef1d78f95..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamsOutOfSyncEventData(Model): - """Incoming streams out of sync event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_last_timestamp: Gets the minimum last timestamp received. - :vartype min_last_timestamp: str - :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with - minimum last timestamp. - :vartype type_of_stream_with_min_last_timestamp: str - :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks - (audio or video). - :vartype max_last_timestamp: str - :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with - maximum last timestamp. - :vartype type_of_stream_with_max_last_timestamp: str - :ivar timescale_of_min_last_timestamp: Gets the timescale in which - "MinLastTimestamp" is represented. - :vartype timescale_of_min_last_timestamp: str - :ivar timescale_of_max_last_timestamp: Gets the timescale in which - "MaxLastTimestamp" is represented. - :vartype timescale_of_max_last_timestamp: str - """ - - _validation = { - 'min_last_timestamp': {'readonly': True}, - 'type_of_stream_with_min_last_timestamp': {'readonly': True}, - 'max_last_timestamp': {'readonly': True}, - 'type_of_stream_with_max_last_timestamp': {'readonly': True}, - 'timescale_of_min_last_timestamp': {'readonly': True}, - 'timescale_of_max_last_timestamp': {'readonly': True}, - } - - _attribute_map = { - 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, - 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, - 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, - 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.min_last_timestamp = None - self.type_of_stream_with_min_last_timestamp = None - self.max_last_timestamp = None - self.type_of_stream_with_max_last_timestamp = None - self.timescale_of_min_last_timestamp = None - self.timescale_of_max_last_timestamp = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data_py3.py deleted file mode 100644 index 0d1a4789aa37..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_streams_out_of_sync_event_data_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingStreamsOutOfSyncEventData(Model): - """Incoming streams out of sync event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar min_last_timestamp: Gets the minimum last timestamp received. - :vartype min_last_timestamp: str - :ivar type_of_stream_with_min_last_timestamp: Gets the type of stream with - minimum last timestamp. - :vartype type_of_stream_with_min_last_timestamp: str - :ivar max_last_timestamp: Gets the maximum timestamp among all the tracks - (audio or video). - :vartype max_last_timestamp: str - :ivar type_of_stream_with_max_last_timestamp: Gets the type of stream with - maximum last timestamp. - :vartype type_of_stream_with_max_last_timestamp: str - :ivar timescale_of_min_last_timestamp: Gets the timescale in which - "MinLastTimestamp" is represented. - :vartype timescale_of_min_last_timestamp: str - :ivar timescale_of_max_last_timestamp: Gets the timescale in which - "MaxLastTimestamp" is represented. - :vartype timescale_of_max_last_timestamp: str - """ - - _validation = { - 'min_last_timestamp': {'readonly': True}, - 'type_of_stream_with_min_last_timestamp': {'readonly': True}, - 'max_last_timestamp': {'readonly': True}, - 'type_of_stream_with_max_last_timestamp': {'readonly': True}, - 'timescale_of_min_last_timestamp': {'readonly': True}, - 'timescale_of_max_last_timestamp': {'readonly': True}, - } - - _attribute_map = { - 'min_last_timestamp': {'key': 'minLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_min_last_timestamp': {'key': 'typeOfStreamWithMinLastTimestamp', 'type': 'str'}, - 'max_last_timestamp': {'key': 'maxLastTimestamp', 'type': 'str'}, - 'type_of_stream_with_max_last_timestamp': {'key': 'typeOfStreamWithMaxLastTimestamp', 'type': 'str'}, - 'timescale_of_min_last_timestamp': {'key': 'timescaleOfMinLastTimestamp', 'type': 'str'}, - 'timescale_of_max_last_timestamp': {'key': 'timescaleOfMaxLastTimestamp', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.min_last_timestamp = None - self.type_of_stream_with_min_last_timestamp = None - self.max_last_timestamp = None - self.type_of_stream_with_max_last_timestamp = None - self.timescale_of_min_last_timestamp = None - self.timescale_of_max_last_timestamp = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data.py deleted file mode 100644 index e29df8e47d3f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(Model): - """Incoming video stream out of synch event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar first_timestamp: Gets the first timestamp received for one of the - quality levels. - :vartype first_timestamp: str - :ivar first_duration: Gets the duration of the data chunk with first - timestamp. - :vartype first_duration: str - :ivar second_timestamp: Gets the timestamp received for some other quality - levels. - :vartype second_timestamp: str - :ivar second_duration: Gets the duration of the data chunk with second - timestamp. - :vartype second_duration: str - :ivar timescale: Gets the timescale in which both the timestamps and - durations are represented. - :vartype timescale: str - """ - - _validation = { - 'first_timestamp': {'readonly': True}, - 'first_duration': {'readonly': True}, - 'second_timestamp': {'readonly': True}, - 'second_duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'first_duration': {'key': 'firstDuration', 'type': 'str'}, - 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, - 'second_duration': {'key': 'secondDuration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.first_timestamp = None - self.first_duration = None - self.second_timestamp = None - self.second_duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data_py3.py deleted file mode 100644 index f0963a0d6ec2..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_incoming_video_streams_out_of_sync_event_data_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIncomingVideoStreamsOutOfSyncEventData(Model): - """Incoming video stream out of synch event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar first_timestamp: Gets the first timestamp received for one of the - quality levels. - :vartype first_timestamp: str - :ivar first_duration: Gets the duration of the data chunk with first - timestamp. - :vartype first_duration: str - :ivar second_timestamp: Gets the timestamp received for some other quality - levels. - :vartype second_timestamp: str - :ivar second_duration: Gets the duration of the data chunk with second - timestamp. - :vartype second_duration: str - :ivar timescale: Gets the timescale in which both the timestamps and - durations are represented. - :vartype timescale: str - """ - - _validation = { - 'first_timestamp': {'readonly': True}, - 'first_duration': {'readonly': True}, - 'second_timestamp': {'readonly': True}, - 'second_duration': {'readonly': True}, - 'timescale': {'readonly': True}, - } - - _attribute_map = { - 'first_timestamp': {'key': 'firstTimestamp', 'type': 'str'}, - 'first_duration': {'key': 'firstDuration', 'type': 'str'}, - 'second_timestamp': {'key': 'secondTimestamp', 'type': 'str'}, - 'second_duration': {'key': 'secondDuration', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, self).__init__(**kwargs) - self.first_timestamp = None - self.first_duration = None - self.second_timestamp = None - self.second_duration = None - self.timescale = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data.py deleted file mode 100644 index 67928e5bd938..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIngestHeartbeatEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar incoming_bitrate: Gets the incoming bitrate. - :vartype incoming_bitrate: long - :ivar last_timestamp: Gets the last timestamp. - :vartype last_timestamp: str - :ivar timescale: Gets the timescale of the last timestamp. - :vartype timescale: str - :ivar overlap_count: Gets the fragment Overlap count. - :vartype overlap_count: long - :ivar discontinuity_count: Gets the fragment Discontinuity count. - :vartype discontinuity_count: long - :ivar nonincreasing_count: Gets Non increasing count. - :vartype nonincreasing_count: long - :ivar unexpected_bitrate: Gets a value indicating whether unexpected - bitrate is present or not. - :vartype unexpected_bitrate: bool - :ivar state: Gets the state of the live event. - :vartype state: str - :ivar healthy: Gets a value indicating whether preview is healthy or not. - :vartype healthy: bool - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'incoming_bitrate': {'readonly': True}, - 'last_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'overlap_count': {'readonly': True}, - 'discontinuity_count': {'readonly': True}, - 'nonincreasing_count': {'readonly': True}, - 'unexpected_bitrate': {'readonly': True}, - 'state': {'readonly': True}, - 'healthy': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, - 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, - 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, - 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'healthy': {'key': 'healthy', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.incoming_bitrate = None - self.last_timestamp = None - self.timescale = None - self.overlap_count = None - self.discontinuity_count = None - self.nonincreasing_count = None - self.unexpected_bitrate = None - self.state = None - self.healthy = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data_py3.py deleted file mode 100644 index 6f9447c3a23e..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_ingest_heartbeat_event_data_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventIngestHeartbeatEventData(Model): - """Ingest fragment dropped event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate of the track. - :vartype bitrate: long - :ivar incoming_bitrate: Gets the incoming bitrate. - :vartype incoming_bitrate: long - :ivar last_timestamp: Gets the last timestamp. - :vartype last_timestamp: str - :ivar timescale: Gets the timescale of the last timestamp. - :vartype timescale: str - :ivar overlap_count: Gets the fragment Overlap count. - :vartype overlap_count: long - :ivar discontinuity_count: Gets the fragment Discontinuity count. - :vartype discontinuity_count: long - :ivar nonincreasing_count: Gets Non increasing count. - :vartype nonincreasing_count: long - :ivar unexpected_bitrate: Gets a value indicating whether unexpected - bitrate is present or not. - :vartype unexpected_bitrate: bool - :ivar state: Gets the state of the live event. - :vartype state: str - :ivar healthy: Gets a value indicating whether preview is healthy or not. - :vartype healthy: bool - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'incoming_bitrate': {'readonly': True}, - 'last_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'overlap_count': {'readonly': True}, - 'discontinuity_count': {'readonly': True}, - 'nonincreasing_count': {'readonly': True}, - 'unexpected_bitrate': {'readonly': True}, - 'state': {'readonly': True}, - 'healthy': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'incoming_bitrate': {'key': 'incomingBitrate', 'type': 'long'}, - 'last_timestamp': {'key': 'lastTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'overlap_count': {'key': 'overlapCount', 'type': 'long'}, - 'discontinuity_count': {'key': 'discontinuityCount', 'type': 'long'}, - 'nonincreasing_count': {'key': 'nonincreasingCount', 'type': 'long'}, - 'unexpected_bitrate': {'key': 'unexpectedBitrate', 'type': 'bool'}, - 'state': {'key': 'state', 'type': 'str'}, - 'healthy': {'key': 'healthy', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventIngestHeartbeatEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.incoming_bitrate = None - self.last_timestamp = None - self.timescale = None - self.overlap_count = None - self.discontinuity_count = None - self.nonincreasing_count = None - self.unexpected_bitrate = None - self.state = None - self.healthy = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data.py deleted file mode 100644 index d60c04d8f294..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventTrackDiscontinuityDetectedEventData(Model): - """Ingest track discontinuity detected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate. - :vartype bitrate: long - :ivar previous_timestamp: Gets the timestamp of the previous fragment. - :vartype previous_timestamp: str - :ivar new_timestamp: Gets the timestamp of the current fragment. - :vartype new_timestamp: str - :ivar timescale: Gets the timescale in which both timestamps and - discontinuity gap are represented. - :vartype timescale: str - :ivar discontinuity_gap: Gets the discontinuity gap between - PreviousTimestamp and NewTimestamp. - :vartype discontinuity_gap: str - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'previous_timestamp': {'readonly': True}, - 'new_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'discontinuity_gap': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, - 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.previous_timestamp = None - self.new_timestamp = None - self.timescale = None - self.discontinuity_gap = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data_py3.py deleted file mode 100644 index 872d6094d5ce..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/media_live_event_track_discontinuity_detected_event_data_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MediaLiveEventTrackDiscontinuityDetectedEventData(Model): - """Ingest track discontinuity detected event data. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar track_type: Gets the type of the track (Audio / Video). - :vartype track_type: str - :ivar track_name: Gets the track name. - :vartype track_name: str - :ivar bitrate: Gets the bitrate. - :vartype bitrate: long - :ivar previous_timestamp: Gets the timestamp of the previous fragment. - :vartype previous_timestamp: str - :ivar new_timestamp: Gets the timestamp of the current fragment. - :vartype new_timestamp: str - :ivar timescale: Gets the timescale in which both timestamps and - discontinuity gap are represented. - :vartype timescale: str - :ivar discontinuity_gap: Gets the discontinuity gap between - PreviousTimestamp and NewTimestamp. - :vartype discontinuity_gap: str - """ - - _validation = { - 'track_type': {'readonly': True}, - 'track_name': {'readonly': True}, - 'bitrate': {'readonly': True}, - 'previous_timestamp': {'readonly': True}, - 'new_timestamp': {'readonly': True}, - 'timescale': {'readonly': True}, - 'discontinuity_gap': {'readonly': True}, - } - - _attribute_map = { - 'track_type': {'key': 'trackType', 'type': 'str'}, - 'track_name': {'key': 'trackName', 'type': 'str'}, - 'bitrate': {'key': 'bitrate', 'type': 'long'}, - 'previous_timestamp': {'key': 'previousTimestamp', 'type': 'str'}, - 'new_timestamp': {'key': 'newTimestamp', 'type': 'str'}, - 'timescale': {'key': 'timescale', 'type': 'str'}, - 'discontinuity_gap': {'key': 'discontinuityGap', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MediaLiveEventTrackDiscontinuityDetectedEventData, self).__init__(**kwargs) - self.track_type = None - self.track_name = None - self.bitrate = None - self.previous_timestamp = None - self.new_timestamp = None - self.timescale = None - self.discontinuity_gap = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py deleted file mode 100644 index 3a01e07bbf84..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceActionCancel event. This is raised when a - resource action operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceActionCancelData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py deleted file mode 100644 index 7999e471f542..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_cancel_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceActionCancel event. This is raised when a - resource action operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceActionCancelData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py deleted file mode 100644 index bb3225665c81..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionFailure event. This is raised when a - resource action operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceActionFailureData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py deleted file mode 100644 index 2c356d0b0340..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_failure_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionFailure event. This is raised when a - resource action operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceActionFailureData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py deleted file mode 100644 index 559817f997ca..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionSuccess event. This is raised when a - resource action operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceActionSuccessData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py deleted file mode 100644 index 59e9f32f46fc..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_action_success_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceActionSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceActionSuccess event. This is raised when a - resource action operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceActionSuccessData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data.py deleted file mode 100644 index fe44a24f3482..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceDeleteCancel event. This is raised when a - resource delete operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceDeleteCancelData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data_py3.py deleted file mode 100644 index d160235c5335..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_cancel_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteCancelData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Resources.ResourceDeleteCancel event. This is raised when a - resource delete operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceDeleteCancelData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data.py deleted file mode 100644 index 1354bd7943fa..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteFailure event. This is raised when a - resource delete operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceDeleteFailureData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data_py3.py deleted file mode 100644 index 29524ca382b8..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_failure_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteFailure event. This is raised when a - resource delete operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceDeleteFailureData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data.py deleted file mode 100644 index a8a114e554c6..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a - resource delete operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceDeleteSuccessData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data_py3.py deleted file mode 100644 index 6775b5666aa0..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_delete_success_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceDeleteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a - resource delete operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceDeleteSuccessData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data.py deleted file mode 100644 index 7e1b1e14e351..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteCancelData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteCancel event. This is raised when a - resource create or update operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceWriteCancelData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data_py3.py deleted file mode 100644 index c2ab521c0495..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_cancel_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteCancelData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteCancel event. This is raised when a - resource create or update operation is canceled. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceWriteCancelData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data.py deleted file mode 100644 index d36108de8d30..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteFailure event. This is raised when a - resource create or update operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceWriteFailureData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data_py3.py deleted file mode 100644 index ab45309bd180..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_failure_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteFailureData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteFailure event. This is raised when a - resource create or update operation fails. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceWriteFailureData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data.py deleted file mode 100644 index a38370581387..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteSuccess event. This is raised when a - resource create or update operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceWriteSuccessData, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.resource_provider = kwargs.get('resource_provider', None) - self.resource_uri = kwargs.get('resource_uri', None) - self.operation_name = kwargs.get('operation_name', None) - self.status = kwargs.get('status', None) - self.authorization = kwargs.get('authorization', None) - self.claims = kwargs.get('claims', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.http_request = kwargs.get('http_request', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data_py3.py deleted file mode 100644 index 0aed7ef74931..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/resource_write_success_data_py3.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ResourceWriteSuccessData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.Resources.ResourceWriteSuccess event. This is raised when a - resource create or update operation succeeds. - - :param tenant_id: The tenant ID of the resource. - :type tenant_id: str - :param subscription_id: The subscription ID of the resource. - :type subscription_id: str - :param resource_group: The resource group of the resource. - :type resource_group: str - :param resource_provider: The resource provider performing the operation. - :type resource_provider: str - :param resource_uri: The URI of the resource in the operation. - :type resource_uri: str - :param operation_name: The operation that was performed. - :type operation_name: str - :param status: The status of the operation. - :type status: str - :param authorization: The requested authorization for the operation. - :type authorization: str - :param claims: The properties of the claims. - :type claims: str - :param correlation_id: An operation ID used for troubleshooting. - :type correlation_id: str - :param http_request: The details of the operation. - :type http_request: str - """ - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'resource_provider': {'key': 'resourceProvider', 'type': 'str'}, - 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'authorization': {'key': 'authorization', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'http_request': {'key': 'httpRequest', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str=None, subscription_id: str=None, resource_group: str=None, resource_provider: str=None, resource_uri: str=None, operation_name: str=None, status: str=None, authorization: str=None, claims: str=None, correlation_id: str=None, http_request: str=None, **kwargs) -> None: - super(ResourceWriteSuccessData, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.subscription_id = subscription_id - self.resource_group = resource_group - self.resource_provider = resource_provider - self.resource_uri = resource_uri - self.operation_name = operation_name - self.status = status - self.authorization = authorization - self.claims = claims - self.correlation_id = correlation_id - self.http_request = http_request diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py deleted file mode 100644 index c409c8396a05..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = kwargs.get('namespace_name', None) - self.request_uri = kwargs.get('request_uri', None) - self.entity_type = kwargs.get('entity_type', None) - self.queue_name = kwargs.get('queue_name', None) - self.topic_name = kwargs.get('topic_name', None) - self.subscription_name = kwargs.get('subscription_name', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py deleted file mode 100644 index 35a4108ae4d9..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_active_messages_available_with_no_listeners_event_data_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusActiveMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: - super(ServiceBusActiveMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = namespace_name - self.request_uri = request_uri - self.entity_type = entity_type - self.queue_name = queue_name - self.topic_name = topic_name - self.subscription_name = subscription_name diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py deleted file mode 100644 index 60310de45628..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = kwargs.get('namespace_name', None) - self.request_uri = kwargs.get('request_uri', None) - self.entity_type = kwargs.get('entity_type', None) - self.queue_name = kwargs.get('queue_name', None) - self.topic_name = kwargs.get('topic_name', None) - self.subscription_name = kwargs.get('subscription_name', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py deleted file mode 100644 index 3f8afafc482c..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/service_bus_deadletter_messages_available_with_no_listeners_event_data_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. - - :param namespace_name: The namespace name of the Microsoft.ServiceBus - resource. - :type namespace_name: str - :param request_uri: The endpoint of the Microsoft.ServiceBus resource. - :type request_uri: str - :param entity_type: The entity type of the Microsoft.ServiceBus resource. - Could be one of 'queue' or 'subscriber'. - :type entity_type: str - :param queue_name: The name of the Microsoft.ServiceBus queue. If the - entity type is of type 'subscriber', then this value will be null. - :type queue_name: str - :param topic_name: The name of the Microsoft.ServiceBus topic. If the - entity type is of type 'queue', then this value will be null. - :type topic_name: str - :param subscription_name: The name of the Microsoft.ServiceBus topic's - subscription. If the entity type is of type 'queue', then this value will - be null. - :type subscription_name: str - """ - - _attribute_map = { - 'namespace_name': {'key': 'namespaceName', 'type': 'str'}, - 'request_uri': {'key': 'requestUri', 'type': 'str'}, - 'entity_type': {'key': 'entityType', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'topic_name': {'key': 'topicName', 'type': 'str'}, - 'subscription_name': {'key': 'subscriptionName', 'type': 'str'}, - } - - def __init__(self, *, namespace_name: str=None, request_uri: str=None, entity_type: str=None, queue_name: str=None, topic_name: str=None, subscription_name: str=None, **kwargs) -> None: - super(ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, self).__init__(**kwargs) - self.namespace_name = namespace_name - self.request_uri = request_uri - self.entity_type = entity_type - self.queue_name = queue_name - self.topic_name = topic_name - self.subscription_name = subscription_name diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data.py deleted file mode 100644 index f48d5ff56765..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionConnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionConnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) - self.timestamp = kwargs.get('timestamp', None) - self.hub = kwargs.get('hub', None) - self.connection_id = kwargs.get('connection_id', None) - self.user_id = kwargs.get('user_id', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data_py3.py deleted file mode 100644 index 2237e0ed5bec..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_connected_event_data_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionConnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionConnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - } - - def __init__(self, *, timestamp=None, hub: str=None, connection_id: str=None, user_id: str=None, **kwargs) -> None: - super(SignalRServiceClientConnectionConnectedEventData, self).__init__(**kwargs) - self.timestamp = timestamp - self.hub = hub - self.connection_id = connection_id - self.user_id = user_id diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data.py deleted file mode 100644 index d888c23cd9dc..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionDisconnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionDisconnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - :param error_message: The message of error that cause the client - connection disconnected. - :type error_message: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) - self.timestamp = kwargs.get('timestamp', None) - self.hub = kwargs.get('hub', None) - self.connection_id = kwargs.get('connection_id', None) - self.user_id = kwargs.get('user_id', None) - self.error_message = kwargs.get('error_message', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data_py3.py deleted file mode 100644 index 44e722c83d3a..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/signal_rservice_client_connection_disconnected_event_data_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SignalRServiceClientConnectionDisconnectedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.SignalRService.ClientConnectionDisconnected event. - - :param timestamp: The time at which the event occurred. - :type timestamp: datetime - :param hub: The hub of connected client connection. - :type hub: str - :param connection_id: The connection Id of connected client connection. - :type connection_id: str - :param user_id: The user Id of connected client connection. - :type user_id: str - :param error_message: The message of error that cause the client - connection disconnected. - :type error_message: str - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'hub': {'key': 'hub', 'type': 'str'}, - 'connection_id': {'key': 'connectionId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - } - - def __init__(self, *, timestamp=None, hub: str=None, connection_id: str=None, user_id: str=None, error_message: str=None, **kwargs) -> None: - super(SignalRServiceClientConnectionDisconnectedEventData, self).__init__(**kwargs) - self.timestamp = timestamp - self.hub = hub - self.connection_id = connection_id - self.user_id = user_id - self.error_message = error_message diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data.py deleted file mode 100644 index edb52bb6a720..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobCreated event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param e_tag: The etag of the object at the time this event was triggered. - :type e_tag: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param content_length: The size of the blob in bytes. This is the same as - what would be returned in the Content-Length header from the blob. - :type content_length: long - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_length': {'key': 'contentLength', 'type': 'long'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(StorageBlobCreatedEventData, self).__init__(**kwargs) - self.api = kwargs.get('api', None) - self.client_request_id = kwargs.get('client_request_id', None) - self.request_id = kwargs.get('request_id', None) - self.e_tag = kwargs.get('e_tag', None) - self.content_type = kwargs.get('content_type', None) - self.content_length = kwargs.get('content_length', None) - self.blob_type = kwargs.get('blob_type', None) - self.url = kwargs.get('url', None) - self.sequencer = kwargs.get('sequencer', None) - self.storage_diagnostics = kwargs.get('storage_diagnostics', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data_py3.py deleted file mode 100644 index 78914ab25fba..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_created_event_data_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobCreatedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobCreated event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param e_tag: The etag of the object at the time this event was triggered. - :type e_tag: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param content_length: The size of the blob in bytes. This is the same as - what would be returned in the Content-Length header from the blob. - :type content_length: long - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_length': {'key': 'contentLength', 'type': 'long'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, e_tag: str=None, content_type: str=None, content_length: int=None, blob_type: str=None, url: str=None, sequencer: str=None, storage_diagnostics=None, **kwargs) -> None: - super(StorageBlobCreatedEventData, self).__init__(**kwargs) - self.api = api - self.client_request_id = client_request_id - self.request_id = request_id - self.e_tag = e_tag - self.content_type = content_type - self.content_length = content_length - self.blob_type = blob_type - self.url = url - self.sequencer = sequencer - self.storage_diagnostics = storage_diagnostics diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data.py deleted file mode 100644 index 1b869057d280..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobDeleted event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(StorageBlobDeletedEventData, self).__init__(**kwargs) - self.api = kwargs.get('api', None) - self.client_request_id = kwargs.get('client_request_id', None) - self.request_id = kwargs.get('request_id', None) - self.content_type = kwargs.get('content_type', None) - self.blob_type = kwargs.get('blob_type', None) - self.url = kwargs.get('url', None) - self.sequencer = kwargs.get('sequencer', None) - self.storage_diagnostics = kwargs.get('storage_diagnostics', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data_py3.py deleted file mode 100644 index 7565e6572c24..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/storage_blob_deleted_event_data_py3.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageBlobDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for an - Microsoft.Storage.BlobDeleted event. - - :param api: The name of the API/operation that triggered this event. - :type api: str - :param client_request_id: A request id provided by the client of the - storage API operation that triggered this event. - :type client_request_id: str - :param request_id: The request id generated by the Storage service for the - storage API operation that triggered this event. - :type request_id: str - :param content_type: The content type of the blob. This is the same as - what would be returned in the Content-Type header from the blob. - :type content_type: str - :param blob_type: The type of blob. - :type blob_type: str - :param url: The path to the blob. - :type url: str - :param sequencer: An opaque string value representing the logical sequence - of events for any particular blob name. Users can use standard string - comparison to understand the relative sequence of two events on the same - blob name. - :type sequencer: str - :param storage_diagnostics: For service use only. Diagnostic data - occasionally included by the Azure Storage service. This property should - be ignored by event consumers. - :type storage_diagnostics: object - """ - - _attribute_map = { - 'api': {'key': 'api', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'request_id': {'key': 'requestId', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'blob_type': {'key': 'blobType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'sequencer': {'key': 'sequencer', 'type': 'str'}, - 'storage_diagnostics': {'key': 'storageDiagnostics', 'type': 'object'}, - } - - def __init__(self, *, api: str=None, client_request_id: str=None, request_id: str=None, content_type: str=None, blob_type: str=None, url: str=None, sequencer: str=None, storage_diagnostics=None, **kwargs) -> None: - super(StorageBlobDeletedEventData, self).__init__(**kwargs) - self.api = api - self.client_request_id = client_request_id - self.request_id = request_id - self.content_type = content_type - self.blob_type = blob_type - self.url = url - self.sequencer = sequencer - self.storage_diagnostics = storage_diagnostics diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py deleted file mode 100644 index 2aa366646706..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionDeletedEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar event_subscription_id: The Azure resource ID of the deleted event - subscription. - :vartype event_subscription_id: str - """ - - _validation = { - 'event_subscription_id': {'readonly': True}, - } - - _attribute_map = { - 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionDeletedEventData, self).__init__(**kwargs) - self.event_subscription_id = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py deleted file mode 100644 index 133338d9d112..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_deleted_event_data_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionDeletedEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionDeletedEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar event_subscription_id: The Azure resource ID of the deleted event - subscription. - :vartype event_subscription_id: str - """ - - _validation = { - 'event_subscription_id': {'readonly': True}, - } - - _attribute_map = { - 'event_subscription_id': {'key': 'eventSubscriptionId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionDeletedEventData, self).__init__(**kwargs) - self.event_subscription_id = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py deleted file mode 100644 index f9d0bfe7c431..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionValidationEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar validation_code: The validation code sent by Azure Event Grid to - validate an event subscription. To complete the validation handshake, the - subscriber must either respond with this validation code as part of the - validation response, or perform a GET request on the validationUrl - (available starting version 2018-05-01-preview). - :vartype validation_code: str - :ivar validation_url: The validation URL sent by Azure Event Grid - (available starting version 2018-05-01-preview). To complete the - validation handshake, the subscriber must either respond with the - validationCode as part of the validation response, or perform a GET - request on the validationUrl (available starting version - 2018-05-01-preview). - :vartype validation_url: str - """ - - _validation = { - 'validation_code': {'readonly': True}, - 'validation_url': {'readonly': True}, - } - - _attribute_map = { - 'validation_code': {'key': 'validationCode', 'type': 'str'}, - 'validation_url': {'key': 'validationUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionValidationEventData, self).__init__(**kwargs) - self.validation_code = None - self.validation_url = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py deleted file mode 100644 index b4302b98927b..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_event_data_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationEventData(Model): - """Schema of the Data property of an EventGridEvent for a - Microsoft.EventGrid.SubscriptionValidationEvent. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar validation_code: The validation code sent by Azure Event Grid to - validate an event subscription. To complete the validation handshake, the - subscriber must either respond with this validation code as part of the - validation response, or perform a GET request on the validationUrl - (available starting version 2018-05-01-preview). - :vartype validation_code: str - :ivar validation_url: The validation URL sent by Azure Event Grid - (available starting version 2018-05-01-preview). To complete the - validation handshake, the subscriber must either respond with the - validationCode as part of the validation response, or perform a GET - request on the validationUrl (available starting version - 2018-05-01-preview). - :vartype validation_url: str - """ - - _validation = { - 'validation_code': {'readonly': True}, - 'validation_url': {'readonly': True}, - } - - _attribute_map = { - 'validation_code': {'key': 'validationCode', 'type': 'str'}, - 'validation_url': {'key': 'validationUrl', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(SubscriptionValidationEventData, self).__init__(**kwargs) - self.validation_code = None - self.validation_url = None diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py deleted file mode 100644 index 034d55d1faf1..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationResponse(Model): - """To complete an event subscription validation handshake, a subscriber can - use either the validationCode or the validationUrl received in a - SubscriptionValidationEvent. When the validationCode is used, the - SubscriptionValidationResponse can be used to build the response. - - :param validation_response: The validation response sent by the subscriber - to Azure Event Grid to complete the validation of an event subscription. - :type validation_response: str - """ - - _attribute_map = { - 'validation_response': {'key': 'validationResponse', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubscriptionValidationResponse, self).__init__(**kwargs) - self.validation_response = kwargs.get('validation_response', None) diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py deleted file mode 100644 index dc76e2a5ca6f..000000000000 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/models/subscription_validation_response_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SubscriptionValidationResponse(Model): - """To complete an event subscription validation handshake, a subscriber can - use either the validationCode or the validationUrl received in a - SubscriptionValidationEvent. When the validationCode is used, the - SubscriptionValidationResponse can be used to build the response. - - :param validation_response: The validation response sent by the subscriber - to Azure Event Grid to complete the validation of an event subscription. - :type validation_response: str - """ - - _attribute_map = { - 'validation_response': {'key': 'validationResponse', 'type': 'str'}, - } - - def __init__(self, *, validation_response: str=None, **kwargs) -> None: - super(SubscriptionValidationResponse, self).__init__(**kwargs) - self.validation_response = validation_response diff --git a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/operations/__init__.py similarity index 58% rename from sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py rename to sdk/eventgrid/azure-eventgrid/azure/eventgrid/operations/__init__.py index f52e1c5671ad..a7619aa10fe0 100644 --- a/sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/operations/__init__.py @@ -9,20 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from ._event_grid_client_operations import EventGridClientOperationsMixin - -class Tag(Model): - """The tag resource. - - :param key: Tag key. - :type key: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Tag, self).__init__(**kwargs) - self.key = kwargs.get('key', None) +__all__ = [ + 'EventGridClientOperationsMixin', +] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/event_grid_client.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/operations/_event_grid_client_operations.py similarity index 64% rename from sdk/eventgrid/azure-eventgrid/azure/eventgrid/event_grid_client.py rename to sdk/eventgrid/azure-eventgrid/azure/eventgrid/operations/_event_grid_client_operations.py index cd2878ff4c78..a16c8bc1ee07 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/event_grid_client.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/operations/_event_grid_client_operations.py @@ -9,60 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import SDKClient -from msrest import Configuration, Serializer, Deserializer -from .version import VERSION from msrest.pipeline import ClientRawResponse from msrest.exceptions import HttpOperationError -from . import models +from .. import models -class EventGridClientConfiguration(Configuration): - """Configuration for EventGridClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - """ - - def __init__( - self, credentials): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - base_url = 'https://{topicHostname}' - - super(EventGridClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-eventgrid/{}'.format(VERSION)) - - self.credentials = credentials - - -class EventGridClient(SDKClient): - """EventGrid Client - - :ivar config: Configuration for client. - :vartype config: EventGridClientConfiguration - - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - """ - - def __init__( - self, credentials): - - self.config = EventGridClientConfiguration(credentials) - super(EventGridClient, 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 = '2018-01-01' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - +class EventGridClientOperationsMixin(object): def publish_events( self, topic_hostname, events, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py index ed04d1bcc9de..7147e25951fc 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py @@ -14,7 +14,6 @@ from ._configuration import HybridComputeManagementClientConfiguration from .operations import MachinesOperations -from .operations import MachineExtensionsOperations from .operations import Operations from . import models @@ -27,8 +26,6 @@ class HybridComputeManagementClient(SDKClient): :ivar machines: Machines operations :vartype machines: azure.mgmt.hybridcompute.operations.MachinesOperations - :ivar machine_extensions: MachineExtensions operations - :vartype machine_extensions: azure.mgmt.hybridcompute.operations.MachineExtensionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.hybridcompute.operations.Operations @@ -55,7 +52,5 @@ def __init__( 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) diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py index 4fd29ce26c71..ae3c3c690315 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/__init__.py @@ -16,6 +16,7 @@ from ._models_py3 import MachineExtension from ._models_py3 import MachineExtensionInstanceView from ._models_py3 import MachineExtensionInstanceViewStatus + from ._models_py3 import MachineExtensionsListResult from ._models_py3 import MachineExtensionUpdate from ._models_py3 import MachineReconnect from ._models_py3 import MachineUpdate @@ -30,6 +31,7 @@ from ._models import MachineExtension from ._models import MachineExtensionInstanceView from ._models import MachineExtensionInstanceViewStatus + from ._models import MachineExtensionsListResult from ._models import MachineExtensionUpdate from ._models import MachineReconnect from ._models import MachineUpdate @@ -37,7 +39,6 @@ from ._models import OSProfile from ._models import Resource from ._models import UpdateResource -from ._paged_models import MachineExtensionPaged from ._paged_models import MachinePaged from ._paged_models import OperationValuePaged from ._hybrid_compute_management_client_enums import ( @@ -53,6 +54,7 @@ 'MachineExtension', 'MachineExtensionInstanceView', 'MachineExtensionInstanceViewStatus', + 'MachineExtensionsListResult', 'MachineExtensionUpdate', 'MachineReconnect', 'MachineUpdate', @@ -61,7 +63,6 @@ 'Resource', 'UpdateResource', 'MachinePaged', - 'MachineExtensionPaged', 'OperationValuePaged', 'StatusTypes', 'StatusLevelTypes', diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py index 97ecf06f915b..29b83876105d 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models.py @@ -433,6 +433,27 @@ def __init__(self, **kwargs): self.time = kwargs.get('time', None) +class MachineExtensionsListResult(Model): + """Describes the Machine Extensions List Result. + + :param value: The list of extensions + :type value: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :param next_link: The uri to fetch the next page of machine extensions. + Call ListNext() with this to fetch the next page of extensions. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MachineExtension]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MachineExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + class UpdateResource(Model): """The Update Resource model definition. diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py index 7be311eb5df6..aac62ee0d304 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_models_py3.py @@ -433,6 +433,27 @@ def __init__(self, *, code: str=None, level=None, display_status: str=None, mess self.time = time +class MachineExtensionsListResult(Model): + """Describes the Machine Extensions List Result. + + :param value: The list of extensions + :type value: list[~azure.mgmt.hybridcompute.models.MachineExtension] + :param next_link: The uri to fetch the next page of machine extensions. + Call ListNext() with this to fetch the next page of extensions. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MachineExtension]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(MachineExtensionsListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + class UpdateResource(Model): """The Update Resource model definition. diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_paged_models.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_paged_models.py index a24959c9dfe8..8e8b15b0e2db 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_paged_models.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/models/_paged_models.py @@ -25,19 +25,6 @@ class MachinePaged(Paged): def __init__(self, *args, **kwargs): super(MachinePaged, self).__init__(*args, **kwargs) -class MachineExtensionPaged(Paged): - """ - A paging container for iterating over a list of :class:`MachineExtension ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MachineExtension]'} - } - - def __init__(self, *args, **kwargs): - - super(MachineExtensionPaged, self).__init__(*args, **kwargs) class OperationValuePaged(Paged): """ A paging container for iterating over a list of :class:`OperationValue ` object diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py index f362d1375d66..1c97029146bd 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/__init__.py @@ -10,11 +10,9 @@ # -------------------------------------------------------------------------- from ._machines_operations import MachinesOperations -from ._machine_extensions_operations import MachineExtensionsOperations from ._operations import Operations __all__ = [ 'MachinesOperations', - 'MachineExtensionsOperations', 'Operations', ] diff --git a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py index ef687d7c63bb..237b9418d415 100644 --- a/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py +++ b/sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/operations/_machines_operations.py @@ -38,141 +38,6 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create_or_update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - """The operation to create or update a hybrid machine resource identity in - Azure. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the hybrid machine. - :type name: str - :param parameters: Parameters supplied to the Create hybrid machine - operation. - :type parameters: ~azure.mgmt.hybridcompute.models.Machine - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Machine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridcompute.models.Machine or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Machine') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Machine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}'} - - def update( - self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config): - """The operation to update a hybrid machine. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the hybrid machine. - :type name: str - :param parameters: Parameters supplied to the Update hybrid machine - operation. - :type parameters: ~azure.mgmt.hybridcompute.models.MachineUpdate - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Machine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridcompute.models.Machine or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MachineUpdate') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Machine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}'} - def delete( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """The operation to remove a hybrid machine identity in Azure. @@ -292,78 +157,6 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}'} - def reconnect( - self, resource_group_name, name, vm_id=None, client_public_key=None, custom_headers=None, raw=False, **operation_config): - """The operation to reconnect a hybrid machine resource to its identity in - Azure. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param name: The name of the hybrid machine. - :type name: str - :param vm_id: Specifies the hybrid machine unique ID. - :type vm_id: str - :param client_public_key: Public Key that the client provides to be - used during initial resource onboarding. - :type client_public_key: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Machine or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridcompute.models.Machine or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.MachineReconnect(vm_id=vm_id, client_public_key=client_public_key) - - # Construct URL - url = self.reconnect.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'name': self._serialize.url("name", name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'MachineReconnect') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Machine', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - reconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/reconnect'} - def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all the hybrid machines in the specified resource group. Use the diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py index 395333b4333e..92bedf358291 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .managed_services_client import ManagedServicesClient -from .version import VERSION +from ._configuration import ManagedServicesClientConfiguration +from ._managed_services_client import ManagedServicesClient +__all__ = ['ManagedServicesClient', 'ManagedServicesClientConfiguration'] -__all__ = ['ManagedServicesClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py new file mode 100644 index 000000000000..308e6a180e30 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_configuration.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class ManagedServicesClientConfiguration(AzureConfiguration): + """Configuration for ManagedServicesClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(ManagedServicesClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-managedservices/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py similarity index 64% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py index 44ac713474e6..4389031b0a9f 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/managed_services_client.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py @@ -11,39 +11,13 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.registration_definitions_operations import RegistrationDefinitionsOperations -from .operations.registration_assignments_operations import RegistrationAssignmentsOperations -from .operations.operations import Operations -from . import models - - -class ManagedServicesClientConfiguration(AzureConfiguration): - """Configuration for ManagedServicesClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param str base_url: Service URL - """ - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(ManagedServicesClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-managedservices/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials +from ._configuration import ManagedServicesClientConfiguration +from .operations import RegistrationDefinitionsOperations +from .operations import RegistrationAssignmentsOperations +from .operations import MarketplaceRegistrationDefinitionsOperations +from .operations import Operations +from . import models class ManagedServicesClient(SDKClient): @@ -56,6 +30,8 @@ class ManagedServicesClient(SDKClient): :vartype registration_definitions: azure.mgmt.managedservices.operations.RegistrationDefinitionsOperations :ivar registration_assignments: RegistrationAssignments operations :vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations + :ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitions operations + :vartype marketplace_registration_definitions: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.managedservices.operations.Operations @@ -72,7 +48,7 @@ def __init__( super(ManagedServicesClient, 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-01' + self.api_version = '2019-09-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -80,5 +56,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.registration_assignments = RegistrationAssignmentsOperations( self._client, self.config, self._serialize, self._deserialize) + self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py index e5f57b0313ff..9ef6595e0467 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/__init__.py @@ -10,53 +10,53 @@ # -------------------------------------------------------------------------- try: - from .authorization_py3 import Authorization - from .registration_definition_properties_py3 import RegistrationDefinitionProperties - from .plan_py3 import Plan - from .registration_definition_py3 import RegistrationDefinition - from .registration_assignment_properties_registration_definition_properties_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties - from .registration_assignment_properties_registration_definition_py3 import RegistrationAssignmentPropertiesRegistrationDefinition - from .registration_assignment_properties_py3 import RegistrationAssignmentProperties - from .registration_assignment_py3 import RegistrationAssignment - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .operation_list_py3 import OperationList - from .error_response_error_py3 import ErrorResponseError - from .error_response_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Authorization + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponseError + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationList + from ._models_py3 import Plan + from ._models_py3 import RegistrationAssignment + from ._models_py3 import RegistrationAssignmentProperties + from ._models_py3 import RegistrationAssignmentPropertiesRegistrationDefinition + from ._models_py3 import RegistrationAssignmentPropertiesRegistrationDefinitionProperties + from ._models_py3 import RegistrationDefinition + from ._models_py3 import RegistrationDefinitionProperties except (SyntaxError, ImportError): - from .authorization import Authorization - from .registration_definition_properties import RegistrationDefinitionProperties - from .plan import Plan - from .registration_definition import RegistrationDefinition - from .registration_assignment_properties_registration_definition_properties import RegistrationAssignmentPropertiesRegistrationDefinitionProperties - from .registration_assignment_properties_registration_definition import RegistrationAssignmentPropertiesRegistrationDefinition - from .registration_assignment_properties import RegistrationAssignmentProperties - from .registration_assignment import RegistrationAssignment - from .operation_display import OperationDisplay - from .operation import Operation - from .operation_list import OperationList - from .error_response_error import ErrorResponseError - from .error_response import ErrorResponse, ErrorResponseException -from .registration_definition_paged import RegistrationDefinitionPaged -from .registration_assignment_paged import RegistrationAssignmentPaged -from .managed_services_client_enums import ( + from ._models import Authorization + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponseError + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationList + from ._models import Plan + from ._models import RegistrationAssignment + from ._models import RegistrationAssignmentProperties + from ._models import RegistrationAssignmentPropertiesRegistrationDefinition + from ._models import RegistrationAssignmentPropertiesRegistrationDefinitionProperties + from ._models import RegistrationDefinition + from ._models import RegistrationDefinitionProperties +from ._paged_models import RegistrationAssignmentPaged +from ._paged_models import RegistrationDefinitionPaged +from ._managed_services_client_enums import ( ProvisioningState, ) __all__ = [ 'Authorization', - 'RegistrationDefinitionProperties', - 'Plan', - 'RegistrationDefinition', - 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties', - 'RegistrationAssignmentPropertiesRegistrationDefinition', - 'RegistrationAssignmentProperties', - 'RegistrationAssignment', - 'OperationDisplay', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponseError', 'Operation', + 'OperationDisplay', 'OperationList', - 'ErrorResponseError', - 'ErrorResponse', 'ErrorResponseException', + 'Plan', + 'RegistrationAssignment', + 'RegistrationAssignmentProperties', + 'RegistrationAssignmentPropertiesRegistrationDefinition', + 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties', + 'RegistrationDefinition', + 'RegistrationDefinitionProperties', 'RegistrationDefinitionPaged', 'RegistrationAssignmentPaged', 'ProvisioningState', diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py similarity index 100% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/managed_services_client_enums.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_managed_services_client_enums.py diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py new file mode 100644 index 000000000000..f3ddf86237ce --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models.py @@ -0,0 +1,508 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Authorization(Model): + """Authorization tuple containing principal Id (of user/service + principal/security group) and role definition id. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. Principal Id of the security group/service + principal/user that would be assigned permissions to the projected + subscription + :type principal_id: str + :param role_definition_id: Required. The role definition identifier. This + role will define all the permissions that the security group/service + principal/user must have on the projected subscription. This role cannot + be an owner role. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Authorization, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error response indicates Azure Resource Manager is not able + to process the incoming request. The reason is provided in the error + message. + :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseError(Model): + """Error response indicates Azure Resource Manager is not able to process the + incoming request. The reason is provided in the error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message indicating why the operation + failed. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Operation(Model): + """Object that describes a single Microsoft.ManagedServices operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ManagedServices + :type provider: str + :param resource: Resource on which the operation is performed: + Registration definition, registration assignment etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationList(Model): + """List of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Microsoft.ManagedServices operations. + :vartype value: list[~azure.mgmt.managedservices.models.Operation] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs): + super(OperationList, self).__init__(**kwargs) + self.value = None + + +class Plan(Model): + """Plan details for the managed services. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan name. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. The product code. + :type product: str + :param version: Required. The plan's version. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.version = kwargs.get('version', None) + + +class RegistrationAssignment(Model): + """Registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties + :ivar id: The fully qualified path of the registration assignment. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration assignment. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignment, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentProperties(Model): + """Properties of a registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param registration_definition_id: Required. Fully qualified path of the + registration definition. + :type registration_definition_id: str + :ivar provisioning_state: Current state of the registration assignment. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar registration_definition: Registration definition inside registration + assignment. + :vartype registration_definition: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition + """ + + _validation = { + 'registration_definition_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'registration_definition': {'readonly': True}, + } + + _attribute_map = { + 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentProperties, self).__init__(**kwargs) + self.registration_definition_id = kwargs.get('registration_definition_id', None) + self.provisioning_state = None + self.registration_definition = None + + +class RegistrationAssignmentPropertiesRegistrationDefinition(Model): + """Registration definition inside registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of registration definition inside + registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.plan = kwargs.get('plan', None) + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): + """Properties of registration definition inside registration assignment. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Authorization tuple containing principal id of the + user/security group or service principal and id of the build-in role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :param managee_tenant_id: Id of the home tenant. + :type managee_tenant_id: str + :param managee_tenant_name: Name of the home tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: Id of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: Name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorizations = kwargs.get('authorizations', None) + self.registration_definition_name = kwargs.get('registration_definition_name', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.managee_tenant_id = kwargs.get('managee_tenant_id', None) + self.managee_tenant_name = kwargs.get('managee_tenant_name', None) + self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) + self.managed_by_tenant_name = kwargs.get('managed_by_tenant_name', None) + + +class RegistrationDefinition(Model): + """Registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationDefinition, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.plan = kwargs.get('plan', None) + self.id = None + self.type = None + self.name = None + + +class RegistrationDefinitionProperties(Model): + """Properties of a registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Required. Authorization tuple containing principal + id of the user/security group or service principal and id of the build-in + role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar managed_by_tenant_name: Name of the managedBy tenant. + :vartype managed_by_tenant_name: str + """ + + _validation = { + 'authorizations': {'required': True}, + 'managed_by_tenant_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.authorizations = kwargs.get('authorizations', None) + self.registration_definition_name = kwargs.get('registration_definition_name', None) + self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) + self.provisioning_state = None + self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py new file mode 100644 index 000000000000..acbdf1365074 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_models_py3.py @@ -0,0 +1,508 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Authorization(Model): + """Authorization tuple containing principal Id (of user/service + principal/security group) and role definition id. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. Principal Id of the security group/service + principal/user that would be assigned permissions to the projected + subscription + :type principal_id: str + :param role_definition_id: Required. The role definition identifier. This + role will define all the permissions that the security group/service + principal/user must have on the projected subscription. This role cannot + be an owner role. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None: + super(Authorization, self).__init__(**kwargs) + self.principal_id = principal_id + self.role_definition_id = role_definition_id + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ErrorResponse(Model): + """Error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: Error response indicates Azure Resource Manager is not able + to process the incoming request. The reason is provided in the error + message. + :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = None + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseError(Model): + """Error response indicates Azure Resource Manager is not able to process the + incoming request. The reason is provided in the error message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message indicating why the operation + failed. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Operation(Model): + """Object that describes a single Microsoft.ManagedServices operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation} + :vartype name: str + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ManagedServices + :type provider: str + :param resource: Resource on which the operation is performed: + Registration definition, registration assignment etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationList(Model): + """List of the operations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Microsoft.ManagedServices operations. + :vartype value: list[~azure.mgmt.managedservices.models.Operation] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationList, self).__init__(**kwargs) + self.value = None + + +class Plan(Model): + """Plan details for the managed services. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan name. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. The product code. + :type product: str + :param version: Required. The plan's version. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str, publisher: str, product: str, version: str, **kwargs) -> None: + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.version = version + + +class RegistrationAssignment(Model): + """Registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties + :ivar id: The fully qualified path of the registration assignment. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration assignment. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(RegistrationAssignment, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentProperties(Model): + """Properties of a registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param registration_definition_id: Required. Fully qualified path of the + registration definition. + :type registration_definition_id: str + :ivar provisioning_state: Current state of the registration assignment. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar registration_definition: Registration definition inside registration + assignment. + :vartype registration_definition: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition + """ + + _validation = { + 'registration_definition_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'registration_definition': {'readonly': True}, + } + + _attribute_map = { + 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, + } + + def __init__(self, *, registration_definition_id: str, **kwargs) -> None: + super(RegistrationAssignmentProperties, self).__init__(**kwargs) + self.registration_definition_id = registration_definition_id + self.provisioning_state = None + self.registration_definition = None + + +class RegistrationAssignmentPropertiesRegistrationDefinition(Model): + """Registration definition inside registration assignment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of registration definition inside + registration assignment. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource + (Microsoft.ManagedServices/registrationDefinitions). + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, plan=None, **kwargs) -> None: + super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) + self.properties = properties + self.plan = plan + self.id = None + self.type = None + self.name = None + + +class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): + """Properties of registration definition inside registration assignment. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Authorization tuple containing principal id of the + user/security group or service principal and id of the build-in role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :type provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :param managee_tenant_id: Id of the home tenant. + :type managee_tenant_id: str + :param managee_tenant_name: Name of the home tenant. + :type managee_tenant_name: str + :param managed_by_tenant_id: Id of the managedBy tenant. + :type managed_by_tenant_id: str + :param managed_by_tenant_name: Name of the managedBy tenant. + :type managed_by_tenant_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, + 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, authorizations=None, registration_definition_name: str=None, provisioning_state=None, managee_tenant_id: str=None, managee_tenant_name: str=None, managed_by_tenant_id: str=None, managed_by_tenant_name: str=None, **kwargs) -> None: + super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = description + self.authorizations = authorizations + self.registration_definition_name = registration_definition_name + self.provisioning_state = provisioning_state + self.managee_tenant_id = managee_tenant_id + self.managee_tenant_name = managee_tenant_name + self.managed_by_tenant_id = managed_by_tenant_id + self.managed_by_tenant_name = managed_by_tenant_name + + +class RegistrationDefinition(Model): + """Registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: Properties of a registration definition. + :type properties: + ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties + :param plan: Plan details for the managed services. + :type plan: ~azure.mgmt.managedservices.models.Plan + :ivar id: Fully qualified path of the registration definition. + :vartype id: str + :ivar type: Type of the resource. + :vartype type: str + :ivar name: Name of the registration definition. + :vartype name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, properties=None, plan=None, **kwargs) -> None: + super(RegistrationDefinition, self).__init__(**kwargs) + self.properties = properties + self.plan = plan + self.id = None + self.type = None + self.name = None + + +class RegistrationDefinitionProperties(Model): + """Properties of a registration definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param description: Description of the registration definition. + :type description: str + :param authorizations: Required. Authorization tuple containing principal + id of the user/security group or service principal and id of the build-in + role. + :type authorizations: + list[~azure.mgmt.managedservices.models.Authorization] + :param registration_definition_name: Name of the registration definition. + :type registration_definition_name: str + :param managed_by_tenant_id: Required. Id of the managedBy tenant. + :type managed_by_tenant_id: str + :ivar provisioning_state: Current state of the registration definition. + Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.managedservices.models.ProvisioningState + :ivar managed_by_tenant_name: Name of the managedBy tenant. + :vartype managed_by_tenant_name: str + """ + + _validation = { + 'authorizations': {'required': True}, + 'managed_by_tenant_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'managed_by_tenant_name': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, + 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, + 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, + } + + def __init__(self, *, authorizations, managed_by_tenant_id: str, description: str=None, registration_definition_name: str=None, **kwargs) -> None: + super(RegistrationDefinitionProperties, self).__init__(**kwargs) + self.description = description + self.authorizations = authorizations + self.registration_definition_name = registration_definition_name + self.managed_by_tenant_id = managed_by_tenant_id + self.provisioning_state = None + self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py similarity index 67% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py index 21a68092ffb5..a5fdea1e54f9 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_paged.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/_paged_models.py @@ -12,6 +12,19 @@ from msrest.paging import Paged +class RegistrationDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`RegistrationDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RegistrationDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(RegistrationDefinitionPaged, self).__init__(*args, **kwargs) class RegistrationAssignmentPaged(Paged): """ A paging container for iterating over a list of :class:`RegistrationAssignment ` object diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py deleted file mode 100644 index d44f2b851134..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Authorization(Model): - """Authorization tuple containing principal Id (of user/service - principal/security group) and role definition id. - - All required parameters must be populated in order to send to Azure. - - :param principal_id: Required. Principal Id of the security group/service - principal/user that would be assigned permissions to the projected - subscription - :type principal_id: str - :param role_definition_id: Required. The role definition identifier. This - role will define all the permissions that the security group/service - principal/user must have on the projected subscription. This role cannot - be an owner role. - :type role_definition_id: str - """ - - _validation = { - 'principal_id': {'required': True}, - 'role_definition_id': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Authorization, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.role_definition_id = kwargs.get('role_definition_id', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py deleted file mode 100644 index dd5307748705..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/authorization_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Authorization(Model): - """Authorization tuple containing principal Id (of user/service - principal/security group) and role definition id. - - All required parameters must be populated in order to send to Azure. - - :param principal_id: Required. Principal Id of the security group/service - principal/user that would be assigned permissions to the projected - subscription - :type principal_id: str - :param role_definition_id: Required. The role definition identifier. This - role will define all the permissions that the security group/service - principal/user must have on the projected subscription. This role cannot - be an owner role. - :type role_definition_id: str - """ - - _validation = { - 'principal_id': {'required': True}, - 'role_definition_id': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - } - - def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None: - super(Authorization, self).__init__(**kwargs) - self.principal_id = principal_id - self.role_definition_id = role_definition_id diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py deleted file mode 100644 index 0bb2ae53f561..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar error: Error response indicates Azure Resource Manager is not able - to process the incoming request. The reason is provided in the error - message. - :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseError'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py deleted file mode 100644 index a22a3fe7daf9..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorResponseError(Model): - """Error response indicates Azure Resource Manager is not able to process the - incoming request. The reason is provided in the error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. - :type code: str - :param message: Required. Error message indicating why the operation - failed. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponseError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py deleted file mode 100644 index 0407b0d4e106..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_error_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorResponseError(Model): - """Error response indicates Azure Resource Manager is not able to process the - incoming request. The reason is provided in the error message. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. - :type code: str - :param message: Required. Error message indicating why the operation - failed. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str, message: str, **kwargs) -> None: - super(ErrorResponseError, self).__init__(**kwargs) - self.code = code - self.message = message diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py deleted file mode 100644 index 65bd21421859..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/error_response_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar error: Error response indicates Azure Resource Manager is not able - to process the incoming request. The reason is provided in the error - message. - :vartype error: ~azure.mgmt.managedservices.models.ErrorResponseError - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseError'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py deleted file mode 100644 index 2b4fc63804f8..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Object that describes a single Microsoft.ManagedServices operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation} - :vartype name: str - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py deleted file mode 100644 index ff3c7d57b1bf..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ManagedServices - :type provider: str - :param resource: Resource on which the operation is performed: - Registration definition, registration assignment etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py deleted file mode 100644 index f6d0e99a0718..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_display_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ManagedServices - :type provider: str - :param resource: Resource on which the operation is performed: - Registration definition, registration assignment etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py deleted file mode 100644 index b3f2e806af4e..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationList(Model): - """List of the operations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: List of Microsoft.ManagedServices operations. - :vartype value: list[~azure.mgmt.managedservices.models.Operation] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs): - super(OperationList, self).__init__(**kwargs) - self.value = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py deleted file mode 100644 index aed3a8d3ce94..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_list_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationList(Model): - """List of the operations. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: List of Microsoft.ManagedServices operations. - :vartype value: list[~azure.mgmt.managedservices.models.Operation] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationList, self).__init__(**kwargs) - self.value = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py deleted file mode 100644 index afbd7d244ce4..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/operation_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """Object that describes a single Microsoft.ManagedServices operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{operation} - :vartype name: str - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.managedservices.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py deleted file mode 100644 index 96a1757eeab2..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Plan details for the managed services. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The plan name. - :type name: str - :param publisher: Required. The publisher ID. - :type publisher: str - :param product: Required. The product code. - :type product: str - :param version: Required. The plan's version. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.version = kwargs.get('version', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py deleted file mode 100644 index 0c37b6b98ba7..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/plan_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Plan(Model): - """Plan details for the managed services. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The plan name. - :type name: str - :param publisher: Required. The publisher ID. - :type publisher: str - :param product: Required. The product code. - :type product: str - :param version: Required. The plan's version. - :type version: str - """ - - _validation = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'product': {'required': True}, - 'version': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, name: str, publisher: str, product: str, version: str, **kwargs) -> None: - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.version = version diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py deleted file mode 100644 index d92e0ddf3858..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignment(Model): - """Registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties - :ivar id: The fully qualified path of the registration assignment. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration assignment. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignment, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py deleted file mode 100644 index 2b0f757e3d6c..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentProperties(Model): - """Properties of a registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param registration_definition_id: Required. Fully qualified path of the - registration definition. - :type registration_definition_id: str - :ivar provisioning_state: Current state of the registration assignment. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar registration_definition: Registration definition inside registration - assignment. - :vartype registration_definition: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition - """ - - _validation = { - 'registration_definition_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'registration_definition': {'readonly': True}, - } - - _attribute_map = { - 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignmentProperties, self).__init__(**kwargs) - self.registration_definition_id = kwargs.get('registration_definition_id', None) - self.provisioning_state = None - self.registration_definition = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py deleted file mode 100644 index 0cc52d0144ec..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentProperties(Model): - """Properties of a registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param registration_definition_id: Required. Fully qualified path of the - registration definition. - :type registration_definition_id: str - :ivar provisioning_state: Current state of the registration assignment. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar registration_definition: Registration definition inside registration - assignment. - :vartype registration_definition: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinition - """ - - _validation = { - 'registration_definition_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'registration_definition': {'readonly': True}, - } - - _attribute_map = { - 'registration_definition_id': {'key': 'registrationDefinitionId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'registration_definition': {'key': 'registrationDefinition', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinition'}, - } - - def __init__(self, *, registration_definition_id: str, **kwargs) -> None: - super(RegistrationAssignmentProperties, self).__init__(**kwargs) - self.registration_definition_id = registration_definition_id - self.provisioning_state = None - self.registration_definition = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py deleted file mode 100644 index 024c1af8b5b3..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentPropertiesRegistrationDefinition(Model): - """Registration definition inside registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of registration definition inside - registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource - (Microsoft.ManagedServices/registrationDefinitions). - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.plan = kwargs.get('plan', None) - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py deleted file mode 100644 index 073e2827f11e..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): - """Properties of registration definition inside registration assignment. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :type provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :param managee_tenant_id: Id of the home tenant. - :type managee_tenant_id: str - :param managee_tenant_name: Name of the home tenant. - :type managee_tenant_name: str - :param managed_by_tenant_id: Id of the managedBy tenant. - :type managed_by_tenant_id: str - :param managed_by_tenant_name: Name of the managedBy tenant. - :type managed_by_tenant_name: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, - 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authorizations = kwargs.get('authorizations', None) - self.registration_definition_name = kwargs.get('registration_definition_name', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.managee_tenant_id = kwargs.get('managee_tenant_id', None) - self.managee_tenant_name = kwargs.get('managee_tenant_name', None) - self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) - self.managed_by_tenant_name = kwargs.get('managed_by_tenant_name', None) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py deleted file mode 100644 index 5dd43174cf1e..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_properties_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentPropertiesRegistrationDefinitionProperties(Model): - """Properties of registration definition inside registration assignment. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Authorization tuple containing principal id of the - user/security group or service principal and id of the build-in role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :type provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :param managee_tenant_id: Id of the home tenant. - :type managee_tenant_id: str - :param managee_tenant_name: Name of the home tenant. - :type managee_tenant_name: str - :param managed_by_tenant_id: Id of the managedBy tenant. - :type managed_by_tenant_id: str - :param managed_by_tenant_name: Name of the managedBy tenant. - :type managed_by_tenant_name: str - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managee_tenant_id': {'key': 'manageeTenantId', 'type': 'str'}, - 'managee_tenant_name': {'key': 'manageeTenantName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, *, description: str=None, authorizations=None, registration_definition_name: str=None, provisioning_state=None, managee_tenant_id: str=None, managee_tenant_name: str=None, managed_by_tenant_id: str=None, managed_by_tenant_name: str=None, **kwargs) -> None: - super(RegistrationAssignmentPropertiesRegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = description - self.authorizations = authorizations - self.registration_definition_name = registration_definition_name - self.provisioning_state = provisioning_state - self.managee_tenant_id = managee_tenant_id - self.managee_tenant_name = managee_tenant_name - self.managed_by_tenant_id = managed_by_tenant_id - self.managed_by_tenant_name = managed_by_tenant_name diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py deleted file mode 100644 index 9a5ef972e44c..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_properties_registration_definition_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignmentPropertiesRegistrationDefinition(Model): - """Registration definition inside registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of registration definition inside - registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentPropertiesRegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource - (Microsoft.ManagedServices/registrationDefinitions). - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentPropertiesRegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties=None, plan=None, **kwargs) -> None: - super(RegistrationAssignmentPropertiesRegistrationDefinition, self).__init__(**kwargs) - self.properties = properties - self.plan = plan - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py deleted file mode 100644 index decb5b20b6c3..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_assignment_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationAssignment(Model): - """Registration assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration assignment. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationAssignmentProperties - :ivar id: The fully qualified path of the registration assignment. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration assignment. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationAssignmentProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(RegistrationAssignment, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py deleted file mode 100644 index 65c19f3f8daa..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDefinition(Model): - """Registration definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration definition. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationDefinition, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.plan = kwargs.get('plan', None) - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py deleted file mode 100644 index 9b51285427ae..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class RegistrationDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`RegistrationDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RegistrationDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(RegistrationDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py deleted file mode 100644 index 714a1a946853..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDefinitionProperties(Model): - """Properties of a registration definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Required. Authorization tuple containing principal - id of the user/security group or service principal and id of the build-in - role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param managed_by_tenant_id: Required. Id of the managedBy tenant. - :type managed_by_tenant_id: str - :ivar provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar managed_by_tenant_name: Name of the managedBy tenant. - :vartype managed_by_tenant_name: str - """ - - _validation = { - 'authorizations': {'required': True}, - 'managed_by_tenant_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'managed_by_tenant_name': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.authorizations = kwargs.get('authorizations', None) - self.registration_definition_name = kwargs.get('registration_definition_name', None) - self.managed_by_tenant_id = kwargs.get('managed_by_tenant_id', None) - self.provisioning_state = None - self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py deleted file mode 100644 index f22a794c8e76..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_properties_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDefinitionProperties(Model): - """Properties of a registration definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param description: Description of the registration definition. - :type description: str - :param authorizations: Required. Authorization tuple containing principal - id of the user/security group or service principal and id of the build-in - role. - :type authorizations: - list[~azure.mgmt.managedservices.models.Authorization] - :param registration_definition_name: Name of the registration definition. - :type registration_definition_name: str - :param managed_by_tenant_id: Required. Id of the managedBy tenant. - :type managed_by_tenant_id: str - :ivar provisioning_state: Current state of the registration definition. - Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', - 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', - 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.managedservices.models.ProvisioningState - :ivar managed_by_tenant_name: Name of the managedBy tenant. - :vartype managed_by_tenant_name: str - """ - - _validation = { - 'authorizations': {'required': True}, - 'managed_by_tenant_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'managed_by_tenant_name': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'authorizations': {'key': 'authorizations', 'type': '[Authorization]'}, - 'registration_definition_name': {'key': 'registrationDefinitionName', 'type': 'str'}, - 'managed_by_tenant_id': {'key': 'managedByTenantId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'managed_by_tenant_name': {'key': 'managedByTenantName', 'type': 'str'}, - } - - def __init__(self, *, authorizations, managed_by_tenant_id: str, description: str=None, registration_definition_name: str=None, **kwargs) -> None: - super(RegistrationDefinitionProperties, self).__init__(**kwargs) - self.description = description - self.authorizations = authorizations - self.registration_definition_name = registration_definition_name - self.managed_by_tenant_id = managed_by_tenant_id - self.provisioning_state = None - self.managed_by_tenant_name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py deleted file mode 100644 index f570181a2764..000000000000 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/models/registration_definition_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistrationDefinition(Model): - """Registration definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: Properties of a registration definition. - :type properties: - ~azure.mgmt.managedservices.models.RegistrationDefinitionProperties - :param plan: Plan details for the managed services. - :type plan: ~azure.mgmt.managedservices.models.Plan - :ivar id: Fully qualified path of the registration definition. - :vartype id: str - :ivar type: Type of the resource. - :vartype type: str - :ivar name: Name of the registration definition. - :vartype name: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RegistrationDefinitionProperties'}, - 'plan': {'key': 'plan', 'type': 'Plan'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, properties=None, plan=None, **kwargs) -> None: - super(RegistrationDefinition, self).__init__(**kwargs) - self.properties = properties - self.plan = plan - self.id = None - self.type = None - self.name = None diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py index f51ba517d417..3b2b2e67052b 100644 --- a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/__init__.py @@ -9,12 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from .registration_definitions_operations import RegistrationDefinitionsOperations -from .registration_assignments_operations import RegistrationAssignmentsOperations -from .operations import Operations +from ._registration_definitions_operations import RegistrationDefinitionsOperations +from ._registration_assignments_operations import RegistrationAssignmentsOperations +from ._marketplace_registration_definitions_operations import MarketplaceRegistrationDefinitionsOperations +from ._operations import Operations __all__ = [ 'RegistrationDefinitionsOperations', 'RegistrationAssignmentsOperations', + 'MarketplaceRegistrationDefinitionsOperations', 'Operations', ] diff --git a/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py new file mode 100644 index 000000000000..91e42506a8f5 --- /dev/null +++ b/sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_marketplace_registration_definitions_operations.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MarketplaceRegistrationDefinitionsOperations(object): + """MarketplaceRegistrationDefinitionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-09-01" + + self.config = config + + def list( + self, scope, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of the marketplace registration definitions for the + marketplace identifier. + + :param scope: Scope of the resource. + :type scope: str + :param filter: The filter query parameter. Might be used to filter + marketplace registration definition by plan identifier, publisher, + version etc. + :type filter: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RegistrationDefinition + :rtype: + ~azure.mgmt.managedservices.models.RegistrationDefinitionPaged[~azure.mgmt.managedservices.models.RegistrationDefinition] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions'} + + def get( + self, scope, marketplace_identifier, custom_headers=None, raw=False, **operation_config): + """Get the marketplace registration definition for the marketplace + identifier. + + :param scope: Scope of the resource. + :type scope: str + :param marketplace_identifier: Market place identifer. Expected + Formats - {publisher}.{product[-preview]}.{planName}.{version} or + {publisher}.{product[-preview]}.{planName} or + {publisher}.{product[-preview]} or {publisher}). + :type marketplace_identifier: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RegistrationDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.managedservices.models.RegistrationDefinition or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), + 'marketplaceIdentifier': self._serialize.url("marketplace_identifier", marketplace_identifier, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RegistrationDefinition', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/marketplaceRegistrationDefinitions/{marketplaceIdentifier}'} 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 similarity index 94% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/operations.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_operations.py index 2cd9ebba8fdd..454eb6c6d1d3 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 @@ -18,11 +18,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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". + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01" + self.api_version = "2019-09-01" self.config = config @@ -76,7 +78,6 @@ def list( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('OperationList', response) 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 similarity index 97% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_assignments_operations.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_assignments_operations.py index 8c4a5d8ddcfb..34b25ccd951a 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 @@ -20,11 +20,13 @@ class RegistrationAssignmentsOperations(object): """RegistrationAssignmentsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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". + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01". """ models = models @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01" + self.api_version = "2019-09-01" self.config = config @@ -94,7 +96,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegistrationAssignment', response) @@ -308,8 +309,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -340,6 +340,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -348,12 +353,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RegistrationAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationAssignments'} 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 similarity index 96% rename from sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py rename to sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/_registration_definitions_operations.py index f30ce8ce7524..d84e0943152e 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 @@ -20,11 +20,13 @@ class RegistrationDefinitionsOperations(object): """RegistrationDefinitionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :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". + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01". """ models = models @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01" + self.api_version = "2019-09-01" self.config = config @@ -88,7 +90,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegistrationDefinition', response) @@ -275,8 +276,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -305,6 +305,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -313,12 +318,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RegistrationDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/{scope}/providers/Microsoft.ManagedServices/registrationDefinitions'} diff --git a/test-repo-billy.azure-sdk-for-python.artifacts.zip b/test-repo-billy.azure-sdk-for-python.artifacts.zip new file mode 100644 index 000000000000..88f9aaf3ebbd Binary files /dev/null and b/test-repo-billy.azure-sdk-for-python.artifacts.zip differ