diff --git a/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md b/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md index e1c4d3759774..3cbad1ea868f 100644 --- a/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md +++ b/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md @@ -1,5 +1,38 @@ # Release History +## 5.0.0b3 (2026-04-23) + +### Features Added + + - Client `IotHubClient` added method `send_request` + - Model `CertificateDescription` added property `system_data` + - Model `EventHubConsumerGroupInfo` added property `system_data` + - Model `PrivateEndpointConnection` added property `system_data` + - Model `Resource` added property `system_data` + - Added model `ProxyResource` + - Added model `TrackedResource` + - Model `CertificatesOperations` added parameter `etag` in method `create_or_update` + - Model `CertificatesOperations` added parameter `match_condition` in method `create_or_update` + - Model `CertificatesOperations` added parameter `etag` in method `delete` + - Model `CertificatesOperations` added parameter `match_condition` in method `delete` + - Model `CertificatesOperations` added parameter `etag` in method `generate_verification_code` + - Model `CertificatesOperations` added parameter `match_condition` in method `generate_verification_code` + - Model `CertificatesOperations` added parameter `etag` in method `verify` + - Model `CertificatesOperations` added parameter `match_condition` in method `verify` + - Model `IotHubResourceOperations` added parameter `etag` in method `begin_create_or_update` + - Model `IotHubResourceOperations` added parameter `match_condition` in method `begin_create_or_update` + +### Breaking Changes + + - Model `Resource` deleted or renamed its instance variable `location` + - Model `Resource` deleted or renamed its instance variable `tags` + - Deleted or renamed model `CertificateBodyDescription` + - Method `CertificatesOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CertificatesOperations.delete` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CertificatesOperations.generate_verification_code` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `CertificatesOperations.verify` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + - Method `IotHubResourceOperations.begin_create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword` + ## 5.0.0b2 (2025-10-20) ### Features Added diff --git a/sdk/iothub/azure-mgmt-iothub/_metadata.json b/sdk/iothub/azure-mgmt-iothub/_metadata.json index 1b374e52ce2b..00c564bbb59a 100644 --- a/sdk/iothub/azure-mgmt-iothub/_metadata.json +++ b/sdk/iothub/azure-mgmt-iothub/_metadata.json @@ -1,11 +1,10 @@ { - "commit": "131b265e5626c867683ddb4770610348fc98d740", + "apiVersion": "2025-08-01-preview", + "apiVersions": { + "Microsoft.Devices": "2025-08-01-preview" + }, + "commit": "eed20b7102f5d73a459f37d2a4b1ed0faa5e8574", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.40.0", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/iothub/resource-manager/Microsoft.Devices/IoTHub/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.40.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/iothub/resource-manager/Microsoft.Devices/IoTHub/readme.md" + "typespec_src": "specification/iothub/resource-manager/Microsoft.Devices/IoTHub", + "emitterVersion": "0.61.3" } \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iothub/apiview-properties.json b/sdk/iothub/azure-mgmt-iothub/apiview-properties.json index b20f4aec7756..7451629e7db0 100644 --- a/sdk/iothub/azure-mgmt-iothub/apiview-properties.json +++ b/sdk/iothub/azure-mgmt-iothub/apiview-properties.json @@ -1,192 +1,185 @@ { - "CrossLanguagePackageId": null, + "CrossLanguagePackageId": "Microsoft.Devices", "CrossLanguageDefinitionId": { - "azure.mgmt.iothub.models.ArmIdentity": null, - "azure.mgmt.iothub.models.ArmUserIdentity": null, - "azure.mgmt.iothub.models.CertificateBodyDescription": null, - "azure.mgmt.iothub.models.CertificateDescription": null, - "azure.mgmt.iothub.models.CertificateListDescription": null, - "azure.mgmt.iothub.models.CertificateProperties": null, - "azure.mgmt.iothub.models.CertificatePropertiesWithNonce": null, - "azure.mgmt.iothub.models.CertificateVerificationDescription": null, - "azure.mgmt.iothub.models.CertificateWithNonceDescription": null, - "azure.mgmt.iothub.models.CloudToDeviceProperties": null, - "azure.mgmt.iothub.models.DeviceRegistry": null, - "azure.mgmt.iothub.models.EncryptionPropertiesDescription": null, - "azure.mgmt.iothub.models.EndpointHealthData": null, - "azure.mgmt.iothub.models.EndpointHealthDataListResult": null, - "azure.mgmt.iothub.models.EnrichmentProperties": null, - "azure.mgmt.iothub.models.ErrorDetails": null, - "azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription": null, - "azure.mgmt.iothub.models.EventHubConsumerGroupInfo": null, - "azure.mgmt.iothub.models.EventHubConsumerGroupName": null, - "azure.mgmt.iothub.models.EventHubConsumerGroupsListResult": null, - "azure.mgmt.iothub.models.EventHubProperties": null, - "azure.mgmt.iothub.models.ExportDevicesRequest": null, - "azure.mgmt.iothub.models.FailoverInput": null, - "azure.mgmt.iothub.models.FallbackRouteProperties": null, - "azure.mgmt.iothub.models.FeedbackProperties": null, - "azure.mgmt.iothub.models.GroupIdInformation": null, - "azure.mgmt.iothub.models.GroupIdInformationProperties": null, - "azure.mgmt.iothub.models.ImportDevicesRequest": null, - "azure.mgmt.iothub.models.IotHubCapacity": null, - "azure.mgmt.iothub.models.Resource": null, - "azure.mgmt.iothub.models.IotHubDescription": null, - "azure.mgmt.iothub.models.IotHubDescriptionListResult": null, - "azure.mgmt.iothub.models.IotHubLocationDescription": null, - "azure.mgmt.iothub.models.IotHubNameAvailabilityInfo": null, - "azure.mgmt.iothub.models.IotHubProperties": null, - "azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams": null, - "azure.mgmt.iothub.models.IotHubQuotaMetricInfo": null, - "azure.mgmt.iothub.models.IotHubQuotaMetricInfoListResult": null, - "azure.mgmt.iothub.models.IotHubSkuDescription": null, - "azure.mgmt.iothub.models.IotHubSkuDescriptionListResult": null, - "azure.mgmt.iothub.models.IotHubSkuInfo": null, - "azure.mgmt.iothub.models.IpFilterRule": null, - "azure.mgmt.iothub.models.JobResponse": null, - "azure.mgmt.iothub.models.JobResponseListResult": null, - "azure.mgmt.iothub.models.KeyVaultKeyProperties": null, - "azure.mgmt.iothub.models.ManagedIdentity": null, - "azure.mgmt.iothub.models.MatchedRoute": null, - "azure.mgmt.iothub.models.MessagingEndpointProperties": null, - "azure.mgmt.iothub.models.Name": null, - "azure.mgmt.iothub.models.NetworkRuleSetIpRule": null, - "azure.mgmt.iothub.models.NetworkRuleSetProperties": null, - "azure.mgmt.iothub.models.Operation": null, - "azure.mgmt.iothub.models.OperationDisplay": null, - "azure.mgmt.iothub.models.OperationInputs": null, - "azure.mgmt.iothub.models.OperationListResult": null, - "azure.mgmt.iothub.models.PrivateEndpoint": null, - "azure.mgmt.iothub.models.PrivateEndpointConnection": null, - "azure.mgmt.iothub.models.PrivateEndpointConnectionProperties": null, - "azure.mgmt.iothub.models.PrivateLinkResources": null, - "azure.mgmt.iothub.models.PrivateLinkServiceConnectionState": null, - "azure.mgmt.iothub.models.RegistryStatistics": null, - "azure.mgmt.iothub.models.RootCertificateProperties": null, - "azure.mgmt.iothub.models.RouteCompilationError": null, - "azure.mgmt.iothub.models.RouteErrorPosition": null, - "azure.mgmt.iothub.models.RouteErrorRange": null, - "azure.mgmt.iothub.models.RouteProperties": null, - "azure.mgmt.iothub.models.RoutingCosmosDBSqlApiProperties": null, - "azure.mgmt.iothub.models.RoutingEndpoints": null, - "azure.mgmt.iothub.models.RoutingEventHubProperties": null, - "azure.mgmt.iothub.models.RoutingMessage": null, - "azure.mgmt.iothub.models.RoutingProperties": null, - "azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties": null, - "azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties": null, - "azure.mgmt.iothub.models.RoutingStorageContainerProperties": null, - "azure.mgmt.iothub.models.RoutingTwin": null, - "azure.mgmt.iothub.models.RoutingTwinProperties": null, - "azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule": null, - "azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRuleListResult": null, - "azure.mgmt.iothub.models.StorageEndpointProperties": null, - "azure.mgmt.iothub.models.SystemData": null, - "azure.mgmt.iothub.models.TagsResource": null, - "azure.mgmt.iothub.models.TestAllRoutesInput": null, - "azure.mgmt.iothub.models.TestAllRoutesResult": null, - "azure.mgmt.iothub.models.TestRouteInput": null, - "azure.mgmt.iothub.models.TestRouteResult": null, - "azure.mgmt.iothub.models.TestRouteResultDetails": null, - "azure.mgmt.iothub.models.UserSubscriptionQuota": null, - "azure.mgmt.iothub.models.UserSubscriptionQuotaListResult": null, - "azure.mgmt.iothub.models.AccessRights": null, - "azure.mgmt.iothub.models.IpFilterActionType": null, - "azure.mgmt.iothub.models.NetworkRuleIPAction": null, - "azure.mgmt.iothub.models.PrivateLinkServiceConnectionStatus": null, - "azure.mgmt.iothub.models.AuthenticationType": null, - "azure.mgmt.iothub.models.RoutingStorageContainerPropertiesEncoding": null, - "azure.mgmt.iothub.models.RoutingSource": null, - "azure.mgmt.iothub.models.IotHubReplicaRoleType": null, - "azure.mgmt.iothub.models.PublicNetworkAccess": null, - "azure.mgmt.iothub.models.DefaultAction": null, - "azure.mgmt.iothub.models.Capabilities": null, - "azure.mgmt.iothub.models.IpVersion": null, - "azure.mgmt.iothub.models.IotHubSku": null, - "azure.mgmt.iothub.models.IotHubSkuTier": null, - "azure.mgmt.iothub.models.ResourceIdentityType": null, - "azure.mgmt.iothub.models.CreatedByType": null, - "azure.mgmt.iothub.models.IotHubScaleType": null, - "azure.mgmt.iothub.models.JobType": null, - "azure.mgmt.iothub.models.JobStatus": null, - "azure.mgmt.iothub.models.EndpointHealthStatus": null, - "azure.mgmt.iothub.models.RouteErrorSeverity": null, - "azure.mgmt.iothub.models.TestResultStatus": null, - "azure.mgmt.iothub.models.IotHubNameUnavailabilityReason": null, - "azure.mgmt.iothub.operations.Operations.list": null, - "azure.mgmt.iothub.aio.operations.Operations.list": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.begin_create_or_update": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.begin_create_or_update": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.begin_update": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.begin_update": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.begin_delete": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.begin_delete": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.list_by_subscription": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_by_subscription": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.list_by_resource_group": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_by_resource_group": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get_stats": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_stats": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get_valid_skus": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_valid_skus": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.list_event_hub_consumer_groups": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_event_hub_consumer_groups": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get_event_hub_consumer_group": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_event_hub_consumer_group": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.create_event_hub_consumer_group": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.create_event_hub_consumer_group": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.delete_event_hub_consumer_group": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.delete_event_hub_consumer_group": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.list_jobs": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_jobs": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get_job": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_job": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get_quota_metrics": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_quota_metrics": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get_endpoint_health": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_endpoint_health": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.check_name_availability": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.check_name_availability": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.test_all_routes": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.test_all_routes": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.test_route": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.test_route": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.list_keys": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_keys": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.get_keys_for_key_name": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_keys_for_key_name": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.export_devices": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.export_devices": null, - "azure.mgmt.iothub.operations.IotHubResourceOperations.import_devices": null, - "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.import_devices": null, - "azure.mgmt.iothub.operations.ResourceProviderCommonOperations.get_subscription_quota": null, - "azure.mgmt.iothub.aio.operations.ResourceProviderCommonOperations.get_subscription_quota": null, - "azure.mgmt.iothub.operations.CertificatesOperations.list_by_iot_hub": null, - "azure.mgmt.iothub.aio.operations.CertificatesOperations.list_by_iot_hub": null, - "azure.mgmt.iothub.operations.CertificatesOperations.get": null, - "azure.mgmt.iothub.aio.operations.CertificatesOperations.get": null, - "azure.mgmt.iothub.operations.CertificatesOperations.create_or_update": null, - "azure.mgmt.iothub.aio.operations.CertificatesOperations.create_or_update": null, - "azure.mgmt.iothub.operations.CertificatesOperations.delete": null, - "azure.mgmt.iothub.aio.operations.CertificatesOperations.delete": null, - "azure.mgmt.iothub.operations.CertificatesOperations.generate_verification_code": null, - "azure.mgmt.iothub.aio.operations.CertificatesOperations.generate_verification_code": null, - "azure.mgmt.iothub.operations.CertificatesOperations.verify": null, - "azure.mgmt.iothub.aio.operations.CertificatesOperations.verify": null, - "azure.mgmt.iothub.operations.IotHubOperations.begin_manual_failover": null, - "azure.mgmt.iothub.aio.operations.IotHubOperations.begin_manual_failover": null, - "azure.mgmt.iothub.operations.PrivateLinkResourcesOperations.list": null, - "azure.mgmt.iothub.aio.operations.PrivateLinkResourcesOperations.list": null, - "azure.mgmt.iothub.operations.PrivateLinkResourcesOperations.get": null, - "azure.mgmt.iothub.aio.operations.PrivateLinkResourcesOperations.get": null, - "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.list": null, - "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.list": null, - "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.get": null, - "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.get": null, - "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.begin_update": null, - "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.begin_update": null, - "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.begin_delete": null, - "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.begin_delete": null + "azure.mgmt.iothub.models.ArmIdentity": "Microsoft.Devices.ArmIdentity", + "azure.mgmt.iothub.models.ArmUserIdentity": "Microsoft.Devices.ArmUserIdentity", + "azure.mgmt.iothub.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.iothub.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.iothub.models.CertificateDescription": "Microsoft.Devices.CertificateDescription", + "azure.mgmt.iothub.models.CertificateListDescription": "Microsoft.Devices.CertificateListDescription", + "azure.mgmt.iothub.models.CertificateProperties": "Microsoft.Devices.CertificateProperties", + "azure.mgmt.iothub.models.CertificatePropertiesWithNonce": "Microsoft.Devices.CertificatePropertiesWithNonce", + "azure.mgmt.iothub.models.CertificateVerificationDescription": "Microsoft.Devices.CertificateVerificationDescription", + "azure.mgmt.iothub.models.CertificateWithNonceDescription": "Microsoft.Devices.CertificateWithNonceDescription", + "azure.mgmt.iothub.models.CloudToDeviceProperties": "Microsoft.Devices.CloudToDeviceProperties", + "azure.mgmt.iothub.models.DeviceRegistry": "Microsoft.Devices.DeviceRegistry", + "azure.mgmt.iothub.models.EncryptionPropertiesDescription": "Microsoft.Devices.EncryptionPropertiesDescription", + "azure.mgmt.iothub.models.EndpointHealthData": "Microsoft.Devices.EndpointHealthData", + "azure.mgmt.iothub.models.EnrichmentProperties": "Microsoft.Devices.EnrichmentProperties", + "azure.mgmt.iothub.models.ErrorDetails": "Microsoft.Devices.ErrorDetails", + "azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription": "Microsoft.Devices.EventHubConsumerGroupBodyDescription", + "azure.mgmt.iothub.models.EventHubConsumerGroupInfo": "Microsoft.Devices.EventHubConsumerGroupInfo", + "azure.mgmt.iothub.models.EventHubConsumerGroupName": "Microsoft.Devices.EventHubConsumerGroupName", + "azure.mgmt.iothub.models.EventHubProperties": "Microsoft.Devices.EventHubProperties", + "azure.mgmt.iothub.models.ExportDevicesRequest": "Microsoft.Devices.ExportDevicesRequest", + "azure.mgmt.iothub.models.FailoverInput": "Microsoft.Devices.FailoverInput", + "azure.mgmt.iothub.models.FallbackRouteProperties": "Microsoft.Devices.FallbackRouteProperties", + "azure.mgmt.iothub.models.FeedbackProperties": "Microsoft.Devices.FeedbackProperties", + "azure.mgmt.iothub.models.GroupIdInformation": "Microsoft.Devices.GroupIdInformation", + "azure.mgmt.iothub.models.GroupIdInformationProperties": "Microsoft.Devices.GroupIdInformationProperties", + "azure.mgmt.iothub.models.ImportDevicesRequest": "Microsoft.Devices.ImportDevicesRequest", + "azure.mgmt.iothub.models.IotHubCapacity": "Microsoft.Devices.IotHubCapacity", + "azure.mgmt.iothub.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.iothub.models.IotHubDescription": "Microsoft.Devices.IotHubDescription", + "azure.mgmt.iothub.models.IotHubLocationDescription": "Microsoft.Devices.IotHubLocationDescription", + "azure.mgmt.iothub.models.IotHubNameAvailabilityInfo": "Microsoft.Devices.IotHubNameAvailabilityInfo", + "azure.mgmt.iothub.models.IotHubProperties": "Microsoft.Devices.IotHubProperties", + "azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams": "Microsoft.Devices.IotHubPropertiesDeviceStreams", + "azure.mgmt.iothub.models.IotHubQuotaMetricInfo": "Microsoft.Devices.IotHubQuotaMetricInfo", + "azure.mgmt.iothub.models.IotHubSkuDescription": "Microsoft.Devices.IotHubSkuDescription", + "azure.mgmt.iothub.models.IotHubSkuInfo": "Microsoft.Devices.IotHubSkuInfo", + "azure.mgmt.iothub.models.IpFilterRule": "Microsoft.Devices.IpFilterRule", + "azure.mgmt.iothub.models.JobResponse": "Microsoft.Devices.JobResponse", + "azure.mgmt.iothub.models.KeyVaultKeyProperties": "Microsoft.Devices.KeyVaultKeyProperties", + "azure.mgmt.iothub.models.ManagedIdentity": "Microsoft.Devices.ManagedIdentity", + "azure.mgmt.iothub.models.MatchedRoute": "Microsoft.Devices.MatchedRoute", + "azure.mgmt.iothub.models.MessagingEndpointProperties": "Microsoft.Devices.MessagingEndpointProperties", + "azure.mgmt.iothub.models.Name": "Microsoft.Devices.Name", + "azure.mgmt.iothub.models.NetworkRuleSetIpRule": "Microsoft.Devices.NetworkRuleSetIpRule", + "azure.mgmt.iothub.models.NetworkRuleSetProperties": "Microsoft.Devices.NetworkRuleSetProperties", + "azure.mgmt.iothub.models.Operation": "Microsoft.Devices.Operation", + "azure.mgmt.iothub.models.OperationDisplay": "Microsoft.Devices.OperationDisplay", + "azure.mgmt.iothub.models.OperationInputs": "Microsoft.Devices.OperationInputs", + "azure.mgmt.iothub.models.PrivateEndpoint": "Microsoft.Devices.PrivateEndpoint", + "azure.mgmt.iothub.models.PrivateEndpointConnection": "Microsoft.Devices.PrivateEndpointConnection", + "azure.mgmt.iothub.models.PrivateEndpointConnectionProperties": "Microsoft.Devices.PrivateEndpointConnectionProperties", + "azure.mgmt.iothub.models.PrivateLinkResources": "Microsoft.Devices.PrivateLinkResources", + "azure.mgmt.iothub.models.PrivateLinkServiceConnectionState": "Microsoft.Devices.PrivateLinkServiceConnectionState", + "azure.mgmt.iothub.models.RegistryStatistics": "Microsoft.Devices.RegistryStatistics", + "azure.mgmt.iothub.models.RootCertificateProperties": "Microsoft.Devices.RootCertificateProperties", + "azure.mgmt.iothub.models.RouteCompilationError": "Microsoft.Devices.RouteCompilationError", + "azure.mgmt.iothub.models.RouteErrorPosition": "Microsoft.Devices.RouteErrorPosition", + "azure.mgmt.iothub.models.RouteErrorRange": "Microsoft.Devices.RouteErrorRange", + "azure.mgmt.iothub.models.RouteProperties": "Microsoft.Devices.RouteProperties", + "azure.mgmt.iothub.models.RoutingCosmosDBSqlApiProperties": "Microsoft.Devices.RoutingCosmosDBSqlApiProperties", + "azure.mgmt.iothub.models.RoutingEndpoints": "Microsoft.Devices.RoutingEndpoints", + "azure.mgmt.iothub.models.RoutingEventHubProperties": "Microsoft.Devices.RoutingEventHubProperties", + "azure.mgmt.iothub.models.RoutingMessage": "Microsoft.Devices.RoutingMessage", + "azure.mgmt.iothub.models.RoutingProperties": "Microsoft.Devices.RoutingProperties", + "azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties": "Microsoft.Devices.RoutingServiceBusQueueEndpointProperties", + "azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties": "Microsoft.Devices.RoutingServiceBusTopicEndpointProperties", + "azure.mgmt.iothub.models.RoutingStorageContainerProperties": "Microsoft.Devices.RoutingStorageContainerProperties", + "azure.mgmt.iothub.models.RoutingTwin": "Microsoft.Devices.RoutingTwin", + "azure.mgmt.iothub.models.RoutingTwinProperties": "Microsoft.Devices.RoutingTwinProperties", + "azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule": "Microsoft.Devices.SharedAccessSignatureAuthorizationRule", + "azure.mgmt.iothub.models.StorageEndpointProperties": "Microsoft.Devices.StorageEndpointProperties", + "azure.mgmt.iothub.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.iothub.models.TagsResource": "Microsoft.Devices.TagsResource", + "azure.mgmt.iothub.models.TestAllRoutesInput": "Microsoft.Devices.TestAllRoutesInput", + "azure.mgmt.iothub.models.TestAllRoutesResult": "Microsoft.Devices.TestAllRoutesResult", + "azure.mgmt.iothub.models.TestRouteInput": "Microsoft.Devices.TestRouteInput", + "azure.mgmt.iothub.models.TestRouteResult": "Microsoft.Devices.TestRouteResult", + "azure.mgmt.iothub.models.TestRouteResultDetails": "Microsoft.Devices.TestRouteResultDetails", + "azure.mgmt.iothub.models.UserSubscriptionQuota": "Microsoft.Devices.UserSubscriptionQuota", + "azure.mgmt.iothub.models.UserSubscriptionQuotaListResult": "Microsoft.Devices.UserSubscriptionQuotaListResult", + "azure.mgmt.iothub.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.iothub.models.PrivateLinkServiceConnectionStatus": "Microsoft.Devices.PrivateLinkServiceConnectionStatus", + "azure.mgmt.iothub.models.AccessRights": "Microsoft.Devices.AccessRights", + "azure.mgmt.iothub.models.PublicNetworkAccess": "Microsoft.Devices.PublicNetworkAccess", + "azure.mgmt.iothub.models.IpFilterActionType": "Microsoft.Devices.IpFilterActionType", + "azure.mgmt.iothub.models.DefaultAction": "Microsoft.Devices.DefaultAction", + "azure.mgmt.iothub.models.NetworkRuleIPAction": "Microsoft.Devices.NetworkRuleIPAction", + "azure.mgmt.iothub.models.AuthenticationType": "Microsoft.Devices.AuthenticationType", + "azure.mgmt.iothub.models.RoutingStorageContainerPropertiesEncoding": "Microsoft.Devices.RoutingStorageContainerPropertiesEncoding", + "azure.mgmt.iothub.models.RoutingSource": "Microsoft.Devices.RoutingSource", + "azure.mgmt.iothub.models.Capabilities": "Microsoft.Devices.Capabilities", + "azure.mgmt.iothub.models.IotHubReplicaRoleType": "Microsoft.Devices.IotHubReplicaRoleType", + "azure.mgmt.iothub.models.IpVersion": "Microsoft.Devices.IpVersion", + "azure.mgmt.iothub.models.IotHubSku": "Microsoft.Devices.IotHubSku", + "azure.mgmt.iothub.models.IotHubSkuTier": "Microsoft.Devices.IotHubSkuTier", + "azure.mgmt.iothub.models.ResourceIdentityType": "Microsoft.Devices.ResourceIdentityType", + "azure.mgmt.iothub.models.IotHubScaleType": "Microsoft.Devices.IotHubScaleType", + "azure.mgmt.iothub.models.JobType": "Microsoft.Devices.JobType", + "azure.mgmt.iothub.models.JobStatus": "Microsoft.Devices.JobStatus", + "azure.mgmt.iothub.models.EndpointHealthStatus": "Microsoft.Devices.EndpointHealthStatus", + "azure.mgmt.iothub.models.TestResultStatus": "Microsoft.Devices.TestResultStatus", + "azure.mgmt.iothub.models.RouteErrorSeverity": "Microsoft.Devices.RouteErrorSeverity", + "azure.mgmt.iothub.models.IotHubNameUnavailabilityReason": "Microsoft.Devices.IotHubNameUnavailabilityReason", + "azure.mgmt.iothub.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.iothub.aio.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.get": "Microsoft.Devices.PrivateEndpointConnections.get", + "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.get": "Microsoft.Devices.PrivateEndpointConnections.get", + "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.begin_update": "Microsoft.Devices.PrivateEndpointConnections.update", + "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.begin_update": "Microsoft.Devices.PrivateEndpointConnections.update", + "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.begin_delete": "Microsoft.Devices.PrivateEndpointConnections.delete", + "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.begin_delete": "Microsoft.Devices.PrivateEndpointConnections.delete", + "azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations.list": "Microsoft.Devices.PrivateEndpointConnections.list", + "azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations.list": "Microsoft.Devices.PrivateEndpointConnections.list", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get": "Microsoft.Devices.IotHubDescriptions.get", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get": "Microsoft.Devices.IotHubDescriptions.get", + "azure.mgmt.iothub.operations.IotHubResourceOperations.begin_create_or_update": "Microsoft.Devices.IotHubDescriptions.createOrUpdate", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.begin_create_or_update": "Microsoft.Devices.IotHubDescriptions.createOrUpdate", + "azure.mgmt.iothub.operations.IotHubResourceOperations.begin_update": "Microsoft.Devices.IotHubDescriptions.update", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.begin_update": "Microsoft.Devices.IotHubDescriptions.update", + "azure.mgmt.iothub.operations.IotHubResourceOperations.begin_delete": "Microsoft.Devices.IotHubDescriptions.delete", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.begin_delete": "Microsoft.Devices.IotHubDescriptions.delete", + "azure.mgmt.iothub.operations.IotHubResourceOperations.list_by_resource_group": "Microsoft.Devices.IotHubDescriptions.listByResourceGroup", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_by_resource_group": "Microsoft.Devices.IotHubDescriptions.listByResourceGroup", + "azure.mgmt.iothub.operations.IotHubResourceOperations.list_by_subscription": "Microsoft.Devices.IotHubDescriptions.listBySubscription", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_by_subscription": "Microsoft.Devices.IotHubDescriptions.listBySubscription", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get_valid_skus": "Microsoft.Devices.IotHubDescriptions.getValidSkus", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_valid_skus": "Microsoft.Devices.IotHubDescriptions.getValidSkus", + "azure.mgmt.iothub.operations.IotHubResourceOperations.list_jobs": "Microsoft.Devices.IotHubDescriptions.listJobs", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_jobs": "Microsoft.Devices.IotHubDescriptions.listJobs", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get_job": "Microsoft.Devices.IotHubDescriptions.getJob", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_job": "Microsoft.Devices.IotHubDescriptions.getJob", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get_quota_metrics": "Microsoft.Devices.IotHubDescriptions.getQuotaMetrics", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_quota_metrics": "Microsoft.Devices.IotHubDescriptions.getQuotaMetrics", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get_endpoint_health": "Microsoft.Devices.IotHubDescriptions.getEndpointHealth", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_endpoint_health": "Microsoft.Devices.IotHubDescriptions.getEndpointHealth", + "azure.mgmt.iothub.operations.IotHubResourceOperations.test_all_routes": "Microsoft.Devices.IotHubDescriptions.testAllRoutes", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.test_all_routes": "Microsoft.Devices.IotHubDescriptions.testAllRoutes", + "azure.mgmt.iothub.operations.IotHubResourceOperations.test_route": "Microsoft.Devices.IotHubDescriptions.testRoute", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.test_route": "Microsoft.Devices.IotHubDescriptions.testRoute", + "azure.mgmt.iothub.operations.IotHubResourceOperations.list_keys": "Microsoft.Devices.IotHubDescriptions.listKeys", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_keys": "Microsoft.Devices.IotHubDescriptions.listKeys", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get_keys_for_key_name": "Microsoft.Devices.IotHubDescriptions.getKeysForKeyName", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_keys_for_key_name": "Microsoft.Devices.IotHubDescriptions.getKeysForKeyName", + "azure.mgmt.iothub.operations.IotHubResourceOperations.export_devices": "Microsoft.Devices.IotHubDescriptions.exportDevices", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.export_devices": "Microsoft.Devices.IotHubDescriptions.exportDevices", + "azure.mgmt.iothub.operations.IotHubResourceOperations.import_devices": "Microsoft.Devices.IotHubDescriptions.importDevices", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.import_devices": "Microsoft.Devices.IotHubDescriptions.importDevices", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get_stats": "Microsoft.Devices.IotHubDescriptionOperationGroup.getStats", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_stats": "Microsoft.Devices.IotHubDescriptionOperationGroup.getStats", + "azure.mgmt.iothub.operations.IotHubResourceOperations.get_event_hub_consumer_group": "Microsoft.Devices.EventHubConsumerGroupInfos.getEventHubConsumerGroup", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.get_event_hub_consumer_group": "Microsoft.Devices.EventHubConsumerGroupInfos.getEventHubConsumerGroup", + "azure.mgmt.iothub.operations.IotHubResourceOperations.create_event_hub_consumer_group": "Microsoft.Devices.EventHubConsumerGroupInfos.createEventHubConsumerGroup", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.create_event_hub_consumer_group": "Microsoft.Devices.EventHubConsumerGroupInfos.createEventHubConsumerGroup", + "azure.mgmt.iothub.operations.IotHubResourceOperations.delete_event_hub_consumer_group": "Microsoft.Devices.EventHubConsumerGroupInfos.deleteEventHubConsumerGroup", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.delete_event_hub_consumer_group": "Microsoft.Devices.EventHubConsumerGroupInfos.deleteEventHubConsumerGroup", + "azure.mgmt.iothub.operations.IotHubResourceOperations.list_event_hub_consumer_groups": "Microsoft.Devices.EventHubConsumerGroupInfos.listEventHubConsumerGroups", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.list_event_hub_consumer_groups": "Microsoft.Devices.EventHubConsumerGroupInfos.listEventHubConsumerGroups", + "azure.mgmt.iothub.operations.IotHubResourceOperations.check_name_availability": "Microsoft.Devices.IotHubResourceOperationGroup.checkNameAvailability", + "azure.mgmt.iothub.aio.operations.IotHubResourceOperations.check_name_availability": "Microsoft.Devices.IotHubResourceOperationGroup.checkNameAvailability", + "azure.mgmt.iothub.operations.IotHubOperations.begin_manual_failover": "Microsoft.Devices.IotHubDescriptions.manualFailover", + "azure.mgmt.iothub.aio.operations.IotHubOperations.begin_manual_failover": "Microsoft.Devices.IotHubDescriptions.manualFailover", + "azure.mgmt.iothub.operations.CertificatesOperations.get": "Microsoft.Devices.CertificateDescriptions.get", + "azure.mgmt.iothub.aio.operations.CertificatesOperations.get": "Microsoft.Devices.CertificateDescriptions.get", + "azure.mgmt.iothub.operations.CertificatesOperations.create_or_update": "Microsoft.Devices.CertificateDescriptions.createOrUpdate", + "azure.mgmt.iothub.aio.operations.CertificatesOperations.create_or_update": "Microsoft.Devices.CertificateDescriptions.createOrUpdate", + "azure.mgmt.iothub.operations.CertificatesOperations.delete": "Microsoft.Devices.CertificateDescriptions.delete", + "azure.mgmt.iothub.aio.operations.CertificatesOperations.delete": "Microsoft.Devices.CertificateDescriptions.delete", + "azure.mgmt.iothub.operations.CertificatesOperations.list_by_iot_hub": "Microsoft.Devices.CertificateDescriptions.listByIotHub", + "azure.mgmt.iothub.aio.operations.CertificatesOperations.list_by_iot_hub": "Microsoft.Devices.CertificateDescriptions.listByIotHub", + "azure.mgmt.iothub.operations.CertificatesOperations.generate_verification_code": "Microsoft.Devices.CertificateDescriptions.generateVerificationCode", + "azure.mgmt.iothub.aio.operations.CertificatesOperations.generate_verification_code": "Microsoft.Devices.CertificateDescriptions.generateVerificationCode", + "azure.mgmt.iothub.operations.CertificatesOperations.verify": "Microsoft.Devices.CertificateDescriptions.verify", + "azure.mgmt.iothub.aio.operations.CertificatesOperations.verify": "Microsoft.Devices.CertificateDescriptions.verify", + "azure.mgmt.iothub.operations.PrivateLinkResourcesOperations.get": "Microsoft.Devices.GroupIdInformations.get", + "azure.mgmt.iothub.aio.operations.PrivateLinkResourcesOperations.get": "Microsoft.Devices.GroupIdInformations.get", + "azure.mgmt.iothub.operations.PrivateLinkResourcesOperations.list": "Microsoft.Devices.GroupIdInformations.list", + "azure.mgmt.iothub.aio.operations.PrivateLinkResourcesOperations.list": "Microsoft.Devices.GroupIdInformations.list", + "azure.mgmt.iothub.operations.ResourceProviderCommonOperations.get_subscription_quota": "Microsoft.Devices.ResourceProviderCommonOperationGroup.getSubscriptionQuota", + "azure.mgmt.iothub.aio.operations.ResourceProviderCommonOperations.get_subscription_quota": "Microsoft.Devices.ResourceProviderCommonOperationGroup.getSubscriptionQuota" } } \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py index ec710f27f0eb..732943a00dc4 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._iot_hub_client import IotHubClient # type: ignore +from ._client import IotHubClient # type: ignore from ._version import VERSION __version__ = VERSION diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_client.py similarity index 86% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_client.py index 4f7527567126..39c2e37a75ca 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_client.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from . import models as _models from ._configuration import IotHubClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( @@ -40,31 +39,32 @@ class IotHubClient: # pylint: disable=too-many-instance-attributes :ivar operations: Operations operations :vartype operations: azure.mgmt.iothub.operations.Operations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations :ivar iot_hub_resource: IotHubResourceOperations operations :vartype iot_hub_resource: azure.mgmt.iothub.operations.IotHubResourceOperations - :ivar resource_provider_common: ResourceProviderCommonOperations operations - :vartype resource_provider_common: - azure.mgmt.iothub.operations.ResourceProviderCommonOperations - :ivar certificates: CertificatesOperations operations - :vartype certificates: azure.mgmt.iothub.operations.CertificatesOperations :ivar iot_hub: IotHubOperations operations :vartype iot_hub: azure.mgmt.iothub.operations.IotHubOperations + :ivar certificates: CertificatesOperations operations + :vartype certificates: azure.mgmt.iothub.operations.CertificatesOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.iothub.operations.PrivateLinkResourcesOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: - azure.mgmt.iothub.operations.PrivateEndpointConnectionsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :ivar resource_provider_common: ResourceProviderCommonOperations operations + :vartype resource_provider_common: + azure.mgmt.iothub.operations.ResourceProviderCommonOperations + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription identifier. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-08-01-preview". Default value is "2025-08-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -79,6 +79,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: @@ -87,6 +88,7 @@ def __init__( self._config = IotHubClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -110,33 +112,32 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.iot_hub_resource = IotHubResourceOperations(self._client, self._config, self._serialize, self._deserialize) - self.resource_provider_common = ResourceProviderCommonOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) + self.iot_hub_resource = IotHubResourceOperations(self._client, self._config, self._serialize, self._deserialize) self.iot_hub = IotHubOperations(self._client, self._config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self.resource_provider_common = ResourceProviderCommonOperations( self._client, self._config, self._serialize, self._deserialize ) - def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -149,7 +150,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py index 31d18a2c158d..cf9639c054b2 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,15 +24,18 @@ class IotHubClientConfiguration: # pylint: disable=too-many-instance-attributes Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription identifier. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-08-01-preview". Default value is "2025-08-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,6 +43,7 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/__init__.py index 0af9b28f6607..8026245c2abc 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/__init__.py @@ -1,6 +1,6 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/model_base.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/model_base.py new file mode 100644 index 000000000000..db24930fdca9 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/model_base.py @@ -0,0 +1,1441 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null +from azure.core.rest import HttpResponse + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") +_NONE_TYPE = type(None) + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + +_ARRAY_ENCODE_MAPPING = { + "pipeDelimited": "|", + "spaceDelimited": " ", + "commaDelimited": ",", + "newlineDelimited": "\n", +} + + +def _deserialize_array_encoded(delimit: str, attr): + if isinstance(attr, str): + if attr == "": + return [] + return attr.split(delimit) + return attr + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj # type: ignore[no-any-return] + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) # type: ignore[no-any-return] + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + # If this key has been deserialized (for mutable types), we need to handle serialization + if hasattr(self, "_attr_to_rest_field"): + cache_attr = f"_deserialized_{key}" + if hasattr(self, cache_attr): + rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) + if rf: + value = self._data.get(key) + if isinstance(value, (dict, list, set)): + # For mutable types, serialize and return + # But also update _data with serialized form and clear flag + # so mutations via this returned value affect _data + serialized = _serialize(value, rf._format) + # If serialized form is same type (no transformation needed), + # return _data directly so mutations work + if isinstance(serialized, type(value)) and serialized == value: + return self._data.get(key) + # Otherwise return serialized copy and clear flag + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + # Store serialized form back + self._data[key] = serialized + return serialized + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + # Clear any cached deserialized value when setting through dictionary access + cache_attr = f"_deserialized_{key}" + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): + return _ARRAY_ENCODE_MAPPING[format].join(o) + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: + if isinstance(args[0], ET.Element): + dict_to_pass.update(self._init_from_xml(args[0])) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def _init_from_xml(self, element: ET.Element) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + model_meta = getattr(self, "_xml", {}) + existed_attr_keys: list[str] = [] + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: list[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): + return deserializer(obj) + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value.text if isinstance(value, ET.Element) else value) + except ValueError: + # for unknown value, return raw value + return value.text if isinstance(value, ET.Element) else value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), module, rf, format) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +# pylint: disable=too-many-instance-attributes +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._is_optional = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + result = getattr(self._type, "args", [None])[0] + # type may be wrapped by nested functools.partial so we need to check for that + if isinstance(result, functools.partial): + return getattr(result, "args", [None])[0] + return result + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + # Use _data.get() directly to avoid triggering __getitem__ which clears the cache + item = obj._data.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + + # For mutable types, we want mutations to directly affect _data + # Check if we've already deserialized this value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + # Return the value from _data directly (it's been deserialized in place) + return obj._data.get(self._rest_name) + + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, store the deserialized value back in _data + # so mutations directly affect _data + if isinstance(deserialized, (dict, list, set)): + obj._data[self._rest_name] = deserialized + object.__setattr__(obj, cache_attr, True) # Mark as deserialized + return deserialized + + return deserialized + + def __set__(self, obj: Model, value) -> None: + # Clear the cached deserialized object when setting a new value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + object.__delattr__(obj, cache_attr) + + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, list[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) + wrapped_element = _create_xml_element( + element_name, + model_meta.get("prefix"), + _model_ns, + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + _set_xml_attribute(wrapped_element, k, v, prop_meta) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": _dict_ns, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": _items_ns, + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[dict[str, typing.Any]], +) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element # type: ignore[no-any-return] + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + +def _create_xml_element( + tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None +) -> ET.Element: + if prefix and ns: + _safe_register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: list[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py index 5f250836cf4b..81ec1de5922b 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -787,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs): # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -821,13 +821,20 @@ def serialize_basic(cls, data, data_type, **kwargs): :param str data_type: Type of object in the iterable. :rtype: str, int, float, bool :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): @@ -1757,7 +1764,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises TypeError: if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1783,7 +1790,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/utils.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/utils.py new file mode 100644 index 000000000000..cbaa624660e4 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/utils.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Optional + +from azure.core import MatchConditions + + +def quote_etag(etag: Optional[str]) -> Optional[str]: + if not etag or etag == "*": + return etag + if etag.startswith("W/"): + return etag + if etag.startswith('"') and etag.endswith('"'): + return etag + if etag.startswith("'") and etag.endswith("'"): + return etag + return '"' + etag + '"' + + +def prep_if_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfNotModified: + if_match = quote_etag(etag) if etag else None + return if_match + if match_condition == MatchConditions.IfPresent: + return "*" + return None + + +def prep_if_none_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfModified: + if_none_match = quote_etag(etag) if etag else None + return if_none_match + if match_condition == MatchConditions.IfMissing: + return "*" + return None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py index c84ffc6cc441..5b4744287959 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py @@ -1,8 +1,9 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "5.0.0b2" +VERSION = "5.0.0b3" diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/__init__.py index df18749d0db3..a8caa4681134 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._iot_hub_client import IotHubClient # type: ignore +from ._client import IotHubClient # type: ignore try: from ._patch import __all__ as _patch_all diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_client.py similarity index 87% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_iot_hub_client.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_client.py index bbb3ba50aada..357df42bc112 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_client.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -17,7 +17,6 @@ from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy from azure.mgmt.core.tools import get_arm_endpoints -from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import IotHubClientConfiguration from .operations import ( @@ -40,32 +39,33 @@ class IotHubClient: # pylint: disable=too-many-instance-attributes :ivar operations: Operations operations :vartype operations: azure.mgmt.iothub.aio.operations.Operations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations :ivar iot_hub_resource: IotHubResourceOperations operations :vartype iot_hub_resource: azure.mgmt.iothub.aio.operations.IotHubResourceOperations - :ivar resource_provider_common: ResourceProviderCommonOperations operations - :vartype resource_provider_common: - azure.mgmt.iothub.aio.operations.ResourceProviderCommonOperations - :ivar certificates: CertificatesOperations operations - :vartype certificates: azure.mgmt.iothub.aio.operations.CertificatesOperations :ivar iot_hub: IotHubOperations operations :vartype iot_hub: azure.mgmt.iothub.aio.operations.IotHubOperations + :ivar certificates: CertificatesOperations operations + :vartype certificates: azure.mgmt.iothub.aio.operations.CertificatesOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.iothub.aio.operations.PrivateLinkResourcesOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: - azure.mgmt.iothub.aio.operations.PrivateEndpointConnectionsOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :ivar resource_provider_common: ResourceProviderCommonOperations operations + :vartype resource_provider_common: + azure.mgmt.iothub.aio.operations.ResourceProviderCommonOperations + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription identifier. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is None. + :param base_url: Service host. Default value is None. :type base_url: str :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-08-01-preview". Default value is "2025-08-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -80,6 +80,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: @@ -88,6 +89,7 @@ def __init__( self._config = IotHubClientConfiguration( credential=credential, subscription_id=subscription_id, + base_url=cast(str, base_url), cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs @@ -112,28 +114,27 @@ def __init__( self._config.http_logging_policy, ] self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( - base_url=cast(str, base_url), policies=_policies, **kwargs + base_url=cast(str, _endpoint), policies=_policies, **kwargs ) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.iot_hub_resource = IotHubResourceOperations(self._client, self._config, self._serialize, self._deserialize) - self.resource_provider_common = ResourceProviderCommonOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) + self.iot_hub_resource = IotHubResourceOperations(self._client, self._config, self._serialize, self._deserialize) self.iot_hub = IotHubOperations(self._client, self._config, self._serialize, self._deserialize) + self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self.resource_provider_common = ResourceProviderCommonOperations( self._client, self._config, self._serialize, self._deserialize ) - def _send_request( + def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. @@ -141,7 +142,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -154,7 +155,11 @@ def _send_request( """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py index 0b464e1d37f1..453ed7623b16 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -24,15 +24,18 @@ class IotHubClientConfiguration: # pylint: disable=too-many-instance-attributes Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription identifier. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are + "2025-08-01-preview". Default value is "2025-08-01-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,6 +43,7 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, + base_url: str = "https://management.azure.com", cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/__init__.py index 7f2b24868d73..d302fd428ec3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,12 +13,12 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import Operations # type: ignore -from ._iot_hub_resource_operations import IotHubResourceOperations # type: ignore -from ._resource_provider_common_operations import ResourceProviderCommonOperations # type: ignore -from ._certificates_operations import CertificatesOperations # type: ignore -from ._iot_hub_operations import IotHubOperations # type: ignore -from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import IotHubResourceOperations # type: ignore +from ._operations import IotHubOperations # type: ignore +from ._operations import CertificatesOperations # type: ignore +from ._operations import PrivateLinkResourcesOperations # type: ignore +from ._operations import ResourceProviderCommonOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -26,12 +26,12 @@ __all__ = [ "Operations", + "PrivateEndpointConnectionsOperations", "IotHubResourceOperations", - "ResourceProviderCommonOperations", - "CertificatesOperations", "IotHubOperations", + "CertificatesOperations", "PrivateLinkResourcesOperations", - "PrivateEndpointConnectionsOperations", + "ResourceProviderCommonOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_certificates_operations.py deleted file mode 100644 index ca1cfe420538..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_certificates_operations.py +++ /dev/null @@ -1,625 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._certificates_operations import ( - build_create_or_update_request, - build_delete_request, - build_generate_verification_code_request, - build_get_request, - build_list_by_iot_hub_request, - build_verify_request, -) -from .._configuration import IotHubClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class CertificatesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.aio.IotHubClient`'s - :attr:`certificates` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list_by_iot_hub( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.CertificateListDescription: - """Get the certificate list. - - Returns the list of certificates. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: CertificateListDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateListDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateListDescription] = kwargs.pop("cls", None) - - _request = build_list_by_iot_hub_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateListDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get( - self, resource_group_name: str, resource_name: str, certificate_name: str, **kwargs: Any - ) -> _models.CertificateDescription: - """Get the certificate. - - Returns the certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - certificate_description: _models.CertificateDescription, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Upload the certificate to the IoT hub. - - Adds new or replaces existing certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param certificate_description: The certificate body. Required. - :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription - :param if_match: ETag of the Certificate. Do not specify for creating a brand new certificate. - Required to update an existing certificate. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - certificate_description: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Upload the certificate to the IoT hub. - - Adds new or replaces existing certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param certificate_description: The certificate body. Required. - :type certificate_description: IO[bytes] - :param if_match: ETag of the Certificate. Do not specify for creating a brand new certificate. - Required to update an existing certificate. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - certificate_description: Union[_models.CertificateDescription, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CertificateDescription: - """Upload the certificate to the IoT hub. - - Adds new or replaces existing certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param certificate_description: The certificate body. Is either a CertificateDescription type - or a IO[bytes] type. Required. - :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription or IO[bytes] - :param if_match: ETag of the Certificate. Do not specify for creating a brand new certificate. - Required to update an existing certificate. Default value is None. - :type if_match: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(certificate_description, (IOBase, bytes)): - _content = certificate_description - else: - _json = self._serialize.body(certificate_description, "CertificateDescription") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete( - self, resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any - ) -> None: - """Delete an X509 certificate. - - Deletes an existing X509 certificate or does nothing if it does not exist. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace_async - async def generate_verification_code( - self, resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any - ) -> _models.CertificateWithNonceDescription: - """Generate verification code for proof of possession flow. - - Generates verification code for proof of possession flow. The verification code will be used to - generate a leaf certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :return: CertificateWithNonceDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateWithNonceDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateWithNonceDescription] = kwargs.pop("cls", None) - - _request = build_generate_verification_code_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateWithNonceDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def verify( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - if_match: str, - certificate_verification_body: _models.CertificateVerificationDescription, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Verify certificate's private key possession. - - Verifies the certificate's private key possession by providing the leaf cert issued by the - verifying pre uploaded certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :param certificate_verification_body: The name of the certificate. Required. - :type certificate_verification_body: - ~azure.mgmt.iothub.models.CertificateVerificationDescription - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def verify( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - if_match: str, - certificate_verification_body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Verify certificate's private key possession. - - Verifies the certificate's private key possession by providing the leaf cert issued by the - verifying pre uploaded certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :param certificate_verification_body: The name of the certificate. Required. - :type certificate_verification_body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def verify( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - if_match: str, - certificate_verification_body: Union[_models.CertificateVerificationDescription, IO[bytes]], - **kwargs: Any - ) -> _models.CertificateDescription: - """Verify certificate's private key possession. - - Verifies the certificate's private key possession by providing the leaf cert issued by the - verifying pre uploaded certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :param certificate_verification_body: The name of the certificate. Is either a - CertificateVerificationDescription type or a IO[bytes] type. Required. - :type certificate_verification_body: - ~azure.mgmt.iothub.models.CertificateVerificationDescription or IO[bytes] - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(certificate_verification_body, (IOBase, bytes)): - _content = certificate_verification_body - else: - _json = self._serialize.body(certificate_verification_body, "CertificateVerificationDescription") - - _request = build_verify_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_operations.py deleted file mode 100644 index c29b3240a77e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_operations.py +++ /dev/null @@ -1,266 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._iot_hub_operations import build_manual_failover_request -from .._configuration import IotHubClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IotHubOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.aio.IotHubClient`'s - :attr:`iot_hub` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def _manual_failover_initial( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: Union[_models.FailoverInput, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(failover_input, (IOBase, bytes)): - _content = failover_input - else: - _json = self._serialize.body(failover_input, "FailoverInput") - - _request = build_manual_failover_request( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_manual_failover( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: _models.FailoverInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Manually initiate a failover for the IoT Hub to its secondary region. - - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see - https://aka.ms/manualfailover. - - :param iot_hub_name: Name of the IoT hub to failover. Required. - :type iot_hub_name: str - :param resource_group_name: Name of the resource group containing the IoT hub resource. - Required. - :type resource_group_name: str - :param failover_input: Region to failover to. Must be the Azure paired region. Get the value - from the secondary location in the locations property. To learn more, see - https://aka.ms/manualfailover/region. Required. - :type failover_input: ~azure.mgmt.iothub.models.FailoverInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_manual_failover( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Manually initiate a failover for the IoT Hub to its secondary region. - - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see - https://aka.ms/manualfailover. - - :param iot_hub_name: Name of the IoT hub to failover. Required. - :type iot_hub_name: str - :param resource_group_name: Name of the resource group containing the IoT hub resource. - Required. - :type resource_group_name: str - :param failover_input: Region to failover to. Must be the Azure paired region. Get the value - from the secondary location in the locations property. To learn more, see - https://aka.ms/manualfailover/region. Required. - :type failover_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_manual_failover( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: Union[_models.FailoverInput, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Manually initiate a failover for the IoT Hub to its secondary region. - - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see - https://aka.ms/manualfailover. - - :param iot_hub_name: Name of the IoT hub to failover. Required. - :type iot_hub_name: str - :param resource_group_name: Name of the resource group containing the IoT hub resource. - Required. - :type resource_group_name: str - :param failover_input: Region to failover to. Must be the Azure paired region. Get the value - from the secondary location in the locations property. To learn more, see - https://aka.ms/manualfailover/region. Is either a FailoverInput type or a IO[bytes] type. - Required. - :type failover_input: ~azure.mgmt.iothub.models.FailoverInput or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._manual_failover_initial( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - failover_input=failover_input, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_resource_operations.py deleted file mode 100644 index 77fea7f3fb74..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_resource_operations.py +++ /dev/null @@ -1,2520 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._iot_hub_resource_operations import ( - build_check_name_availability_request, - build_create_event_hub_consumer_group_request, - build_create_or_update_request, - build_delete_event_hub_consumer_group_request, - build_delete_request, - build_export_devices_request, - build_get_endpoint_health_request, - build_get_event_hub_consumer_group_request, - build_get_job_request, - build_get_keys_for_key_name_request, - build_get_quota_metrics_request, - build_get_request, - build_get_stats_request, - build_get_valid_skus_request, - build_import_devices_request, - build_list_by_resource_group_request, - build_list_by_subscription_request, - build_list_event_hub_consumer_groups_request, - build_list_jobs_request, - build_list_keys_request, - build_test_all_routes_request, - build_test_route_request, - build_update_request, -) -from .._configuration import IotHubClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IotHubResourceOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.aio.IotHubClient`'s - :attr:`iot_hub_resource` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.IotHubDescription: - """Get the non-security related metadata of an IoT hub. - - Get the non-security related metadata of an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: IotHubDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: Union[_models.IotHubDescription, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(iot_hub_description, (IOBase, bytes)): - _content = iot_hub_description - else: - _json = self._serialize.body(iot_hub_description, "IotHubDescription") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: _models.IotHubDescription, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IotHubDescription]: - """Create or update the metadata of an IoT hub. - - Create or update the metadata of an Iot hub. The usual pattern to modify a property is to - retrieve the IoT hub metadata and security metadata, and then combine them with the modified - values in a new body to update the IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param iot_hub_description: The IoT hub metadata and security metadata. Required. - :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription - :param if_match: ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required - to update an existing IoT Hub. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IotHubDescription]: - """Create or update the metadata of an IoT hub. - - Create or update the metadata of an Iot hub. The usual pattern to modify a property is to - retrieve the IoT hub metadata and security metadata, and then combine them with the modified - values in a new body to update the IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param iot_hub_description: The IoT hub metadata and security metadata. Required. - :type iot_hub_description: IO[bytes] - :param if_match: ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required - to update an existing IoT Hub. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: Union[_models.IotHubDescription, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.IotHubDescription]: - """Create or update the metadata of an IoT hub. - - Create or update the metadata of an Iot hub. The usual pattern to modify a property is to - retrieve the IoT hub metadata and security metadata, and then combine them with the modified - values in a new body to update the IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param iot_hub_description: The IoT hub metadata and security metadata. Is either a - IotHubDescription type or a IO[bytes] type. Required. - :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription or IO[bytes] - :param if_match: ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required - to update an existing IoT Hub. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - iot_hub_description=iot_hub_description, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IotHubDescription].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IotHubDescription]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: Union[_models.TagsResource, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(iot_hub_tags, (IOBase, bytes)): - _content = iot_hub_tags - else: - _json = self._serialize.body(iot_hub_tags, "TagsResource") - - _request = build_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: _models.TagsResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IotHubDescription]: - """Update an existing IoT Hubs tags. - - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. - - :param resource_group_name: Resource group identifier. Required. - :type resource_group_name: str - :param resource_name: Name of iot hub to update. Required. - :type resource_name: str - :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. - :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IotHubDescription]: - """Update an existing IoT Hubs tags. - - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. - - :param resource_group_name: Resource group identifier. Required. - :type resource_group_name: str - :param resource_name: Name of iot hub to update. Required. - :type resource_name: str - :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. - :type iot_hub_tags: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: Union[_models.TagsResource, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IotHubDescription]: - """Update an existing IoT Hubs tags. - - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. - - :param resource_group_name: Resource group identifier. Required. - :type resource_group_name: str - :param resource_name: Name of iot hub to update. Required. - :type resource_name: str - :param iot_hub_tags: Updated tag information to set into the iot hub instance. Is either a - TagsResource type or a IO[bytes] type. Required. - :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - iot_hub_tags=iot_hub_tags, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IotHubDescription].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IotHubDescription]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204, 404]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.IotHubDescription]: - """Delete an IoT hub. - - Delete an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An instance of AsyncLROPoller that returns either IotHubDescription or An instance of - AsyncLROPoller that returns either ErrorDetails or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] or - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.ErrorDetails] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IotHubDescription].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IotHubDescription]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IotHubDescription"]: - """Get all the IoT hubs in a subscription. - - Get all the IoT hubs in a subscription. - - :return: An iterator like instance of either IotHubDescription or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescriptionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubDescriptionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IotHubDescription"]: - """Get all the IoT hubs in a resource group. - - Get all the IoT hubs in a resource group. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :return: An iterator like instance of either IotHubDescription or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescriptionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubDescriptionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_stats( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.RegistryStatistics: - """Get the statistics from an IoT hub. - - Get the statistics from an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: RegistryStatistics or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.RegistryStatistics - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RegistryStatistics] = kwargs.pop("cls", None) - - _request = build_get_stats_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RegistryStatistics", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_valid_skus( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IotHubSkuDescription"]: - """Get the list of valid SKUs for an IoT hub. - - Get the list of valid SKUs for an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either IotHubSkuDescription or the result of - cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubSkuDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubSkuDescriptionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_get_valid_skus_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubSkuDescriptionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_event_hub_consumer_groups( - self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.EventHubConsumerGroupInfo"]: - """Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an - IoT hub. - - Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an - IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint. Required. - :type event_hub_endpoint_name: str - :return: An iterator like instance of either EventHubConsumerGroupInfo or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EventHubConsumerGroupsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_event_hub_consumer_groups_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("EventHubConsumerGroupsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_event_hub_consumer_group( - self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - - Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to retrieve. Required. - :type name: str - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) - - _request = build_get_event_hub_consumer_group_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("EventHubConsumerGroupInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def create_event_hub_consumer_group( - self, - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - consumer_group_body: _models.EventHubConsumerGroupBodyDescription, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to add. Required. - :type name: str - :param consumer_group_body: The consumer group to add. Required. - :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_event_hub_consumer_group( - self, - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - consumer_group_body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to add. Required. - :type name: str - :param consumer_group_body: The consumer group to add. Required. - :type consumer_group_body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_event_hub_consumer_group( - self, - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - consumer_group_body: Union[_models.EventHubConsumerGroupBodyDescription, IO[bytes]], - **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to add. Required. - :type name: str - :param consumer_group_body: The consumer group to add. Is either a - EventHubConsumerGroupBodyDescription type or a IO[bytes] type. Required. - :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription or - IO[bytes] - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(consumer_group_body, (IOBase, bytes)): - _content = consumer_group_body - else: - _json = self._serialize.body(consumer_group_body, "EventHubConsumerGroupBodyDescription") - - _request = build_create_event_hub_consumer_group_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("EventHubConsumerGroupInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete_event_hub_consumer_group( - self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any - ) -> None: - """Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - - Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to delete. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_event_hub_consumer_group_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_jobs( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.JobResponse"]: - """Get a list of all the jobs in an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - Get a list of all the jobs in an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either JobResponse or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.JobResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JobResponseListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_jobs_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("JobResponseListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_job( - self, resource_group_name: str, resource_name: str, job_id: str, **kwargs: Any - ) -> _models.JobResponse: - """Get the details of a job from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - Get the details of a job from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param job_id: The job identifier. Required. - :type job_id: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) - - _request = build_get_job_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - job_id=job_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JobResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_quota_metrics( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IotHubQuotaMetricInfo"]: - """Get the quota metrics for an IoT hub. - - Get the quota metrics for an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either IotHubQuotaMetricInfo or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubQuotaMetricInfoListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_get_quota_metrics_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubQuotaMetricInfoListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def get_endpoint_health( - self, resource_group_name: str, iot_hub_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.EndpointHealthData"]: - """Get the health for routing endpoints. - - Get the health for routing endpoints. - - :param resource_group_name: Required. - :type resource_group_name: str - :param iot_hub_name: Required. - :type iot_hub_name: str - :return: An iterator like instance of either EndpointHealthData or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.EndpointHealthData] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EndpointHealthDataListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_get_endpoint_health_request( - resource_group_name=resource_group_name, - iot_hub_name=iot_hub_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("EndpointHealthDataListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @overload - async def check_name_availability( - self, operation_inputs: _models.OperationInputs, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IotHubNameAvailabilityInfo: - """Check if an IoT hub name is available. - - Check if an IoT hub name is available. - - :param operation_inputs: Set the name parameter in the OperationInputs structure to the name of - the IoT hub to check. Required. - :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IotHubNameAvailabilityInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, operation_inputs: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IotHubNameAvailabilityInfo: - """Check if an IoT hub name is available. - - Check if an IoT hub name is available. - - :param operation_inputs: Set the name parameter in the OperationInputs structure to the name of - the IoT hub to check. Required. - :type operation_inputs: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IotHubNameAvailabilityInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, operation_inputs: Union[_models.OperationInputs, IO[bytes]], **kwargs: Any - ) -> _models.IotHubNameAvailabilityInfo: - """Check if an IoT hub name is available. - - Check if an IoT hub name is available. - - :param operation_inputs: Set the name parameter in the OperationInputs structure to the name of - the IoT hub to check. Is either a OperationInputs type or a IO[bytes] type. Required. - :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs or IO[bytes] - :return: IotHubNameAvailabilityInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IotHubNameAvailabilityInfo] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(operation_inputs, (IOBase, bytes)): - _content = operation_inputs - else: - _json = self._serialize.body(operation_inputs, "OperationInputs") - - _request = build_check_name_availability_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IotHubNameAvailabilityInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def test_all_routes( - self, - iot_hub_name: str, - resource_group_name: str, - input: _models.TestAllRoutesInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestAllRoutesResult: - """Test all routes. - - Test all routes configured in this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Input for testing all routes. Required. - :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TestAllRoutesResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def test_all_routes( - self, - iot_hub_name: str, - resource_group_name: str, - input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestAllRoutesResult: - """Test all routes. - - Test all routes configured in this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Input for testing all routes. Required. - :type input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TestAllRoutesResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def test_all_routes( - self, - iot_hub_name: str, - resource_group_name: str, - input: Union[_models.TestAllRoutesInput, IO[bytes]], - **kwargs: Any - ) -> _models.TestAllRoutesResult: - """Test all routes. - - Test all routes configured in this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Input for testing all routes. Is either a TestAllRoutesInput type or a IO[bytes] - type. Required. - :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput or IO[bytes] - :return: TestAllRoutesResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TestAllRoutesResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(input, (IOBase, bytes)): - _content = input - else: - _json = self._serialize.body(input, "TestAllRoutesInput") - - _request = build_test_all_routes_request( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TestAllRoutesResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def test_route( - self, - iot_hub_name: str, - resource_group_name: str, - input: _models.TestRouteInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestRouteResult: - """Test the new route. - - Test the new route for this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Route that needs to be tested. Required. - :type input: ~azure.mgmt.iothub.models.TestRouteInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TestRouteResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestRouteResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def test_route( - self, - iot_hub_name: str, - resource_group_name: str, - input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestRouteResult: - """Test the new route. - - Test the new route for this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Route that needs to be tested. Required. - :type input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TestRouteResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestRouteResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def test_route( - self, - iot_hub_name: str, - resource_group_name: str, - input: Union[_models.TestRouteInput, IO[bytes]], - **kwargs: Any - ) -> _models.TestRouteResult: - """Test the new route. - - Test the new route for this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Route that needs to be tested. Is either a TestRouteInput type or a IO[bytes] - type. Required. - :type input: ~azure.mgmt.iothub.models.TestRouteInput or IO[bytes] - :return: TestRouteResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestRouteResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TestRouteResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(input, (IOBase, bytes)): - _content = input - else: - _json = self._serialize.body(input, "TestRouteInput") - - _request = build_test_route_request( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TestRouteResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_keys( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.SharedAccessSignatureAuthorizationRule"]: - """Get the security metadata for an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - Get the security metadata for an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either SharedAccessSignatureAuthorizationRule or the - result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SharedAccessSignatureAuthorizationRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_keys_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SharedAccessSignatureAuthorizationRuleListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_keys_for_key_name( - self, resource_group_name: str, resource_name: str, key_name: str, **kwargs: Any - ) -> _models.SharedAccessSignatureAuthorizationRule: - """Get a shared access policy by name from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - Get a shared access policy by name from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param key_name: The name of the shared access policy. Required. - :type key_name: str - :return: SharedAccessSignatureAuthorizationRule or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SharedAccessSignatureAuthorizationRule] = kwargs.pop("cls", None) - - _request = build_get_keys_for_key_name_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - key_name=key_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SharedAccessSignatureAuthorizationRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def export_devices( - self, - resource_group_name: str, - resource_name: str, - export_devices_parameters: _models.ExportDevicesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param export_devices_parameters: The parameters that specify the export devices operation. - Required. - :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def export_devices( - self, - resource_group_name: str, - resource_name: str, - export_devices_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param export_devices_parameters: The parameters that specify the export devices operation. - Required. - :type export_devices_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def export_devices( - self, - resource_group_name: str, - resource_name: str, - export_devices_parameters: Union[_models.ExportDevicesRequest, IO[bytes]], - **kwargs: Any - ) -> _models.JobResponse: - """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param export_devices_parameters: The parameters that specify the export devices operation. Is - either a ExportDevicesRequest type or a IO[bytes] type. Required. - :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest or IO[bytes] - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(export_devices_parameters, (IOBase, bytes)): - _content = export_devices_parameters - else: - _json = self._serialize.body(export_devices_parameters, "ExportDevicesRequest") - - _request = build_export_devices_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JobResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def import_devices( - self, - resource_group_name: str, - resource_name: str, - import_devices_parameters: _models.ImportDevicesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param import_devices_parameters: The parameters that specify the import devices operation. - Required. - :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def import_devices( - self, - resource_group_name: str, - resource_name: str, - import_devices_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param import_devices_parameters: The parameters that specify the import devices operation. - Required. - :type import_devices_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def import_devices( - self, - resource_group_name: str, - resource_name: str, - import_devices_parameters: Union[_models.ImportDevicesRequest, IO[bytes]], - **kwargs: Any - ) -> _models.JobResponse: - """Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param import_devices_parameters: The parameters that specify the import devices operation. Is - either a ImportDevicesRequest type or a IO[bytes] type. Required. - :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest or IO[bytes] - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(import_devices_parameters, (IOBase, bytes)): - _content = import_devices_parameters - else: - _json = self._serialize.body(import_devices_parameters, "ImportDevicesRequest") - - _request = build_import_devices_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JobResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py index 63b6445d5c08..e35959a3bc46 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py @@ -1,37 +1,87 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +from io import IOBase +import json +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse -from azure.core import AsyncPipelineClient +from azure.core import AsyncPipelineClient, MatchConditions from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, + ResourceModifiedError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_list_request +from ...operations._operations import ( + build_certificates_create_or_update_request, + build_certificates_delete_request, + build_certificates_generate_verification_code_request, + build_certificates_get_request, + build_certificates_list_by_iot_hub_request, + build_certificates_verify_request, + build_iot_hub_manual_failover_request, + build_iot_hub_resource_check_name_availability_request, + build_iot_hub_resource_create_event_hub_consumer_group_request, + build_iot_hub_resource_create_or_update_request, + build_iot_hub_resource_delete_event_hub_consumer_group_request, + build_iot_hub_resource_delete_request, + build_iot_hub_resource_export_devices_request, + build_iot_hub_resource_get_endpoint_health_request, + build_iot_hub_resource_get_event_hub_consumer_group_request, + build_iot_hub_resource_get_job_request, + build_iot_hub_resource_get_keys_for_key_name_request, + build_iot_hub_resource_get_quota_metrics_request, + build_iot_hub_resource_get_request, + build_iot_hub_resource_get_stats_request, + build_iot_hub_resource_get_valid_skus_request, + build_iot_hub_resource_import_devices_request, + build_iot_hub_resource_list_by_resource_group_request, + build_iot_hub_resource_list_by_subscription_request, + build_iot_hub_resource_list_event_hub_consumer_groups_request, + build_iot_hub_resource_list_jobs_request, + build_iot_hub_resource_list_keys_request, + build_iot_hub_resource_test_all_routes_request, + build_iot_hub_resource_test_route_request, + build_iot_hub_resource_update_request, + build_operations_list_request, + build_private_endpoint_connections_delete_request, + build_private_endpoint_connections_get_request, + build_private_endpoint_connections_list_request, + build_private_endpoint_connections_update_request, + build_private_link_resources_get_request, + build_private_link_resources_list_request, + build_resource_provider_common_get_subscription_quota_request, +) from .._configuration import IotHubClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list @@ -45,8 +95,6 @@ class Operations: :attr:`operations` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") @@ -56,17 +104,16 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: - """Lists all of the available IoT Hub REST API operations. + """List the operations for the provider. - :return: An iterator like instance of either Operation or the result of cls(response) + :return: An iterator like instance of Operation :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -79,12 +126,17 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_operations_list_request( + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -99,16 +151,24 @@ def prepare_request(next_link=None): _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) @@ -121,9 +181,4985 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.aio.IotHubClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Get private endpoint connection. + + Get private endpoint connection properties. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(private_endpoint_connection, (IOBase, bytes)): + _content = private_endpoint_connection + else: + _content = json.dumps(private_endpoint_connection, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connections_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. + Required. + :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. + Required. + :type private_endpoint_connection: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. + Required. + :type private_endpoint_connection: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. Is + one of the following types: PrivateEndpointConnection, JSON, IO[bytes] Required. + :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection or JSON + or IO[bytes] + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Delete private endpoint connection. + + Delete private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> List[_models.PrivateEndpointConnection]: + """List private endpoint connections. + + List private endpoint connection properties. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :return: list of PrivateEndpointConnection + :rtype: list[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(List[_models.PrivateEndpointConnection], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class IotHubResourceOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.aio.IotHubClient`'s + :attr:`iot_hub_resource` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.IotHubDescription: + """Get the non-security related metadata of an IoT hub. + + Get the non-security related metadata of an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: IotHubDescription. The IotHubDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IotHubDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: Union[_models.IotHubDescription, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(iot_hub_description, (IOBase, bytes)): + _content = iot_hub_description + else: + _content = json.dumps(iot_hub_description, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: _models.IotHubDescription, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Required. + :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Required. + :type iot_hub_description: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Required. + :type iot_hub_description: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: Union[_models.IotHubDescription, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Is one of the following + types: IotHubDescription, JSON, IO[bytes] Required. + :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + iot_hub_description=iot_hub_description, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IotHubDescription, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IotHubDescription].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IotHubDescription]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: Union[_models.TagsResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(iot_hub_tags, (IOBase, bytes)): + _content = iot_hub_tags + else: + _content = json.dumps(iot_hub_tags, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: _models.TagsResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. + :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. + :type iot_hub_tags: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. + :type iot_hub_tags: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: Union[_models.TagsResource, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Is one of the + following types: TagsResource, JSON, IO[bytes] Required. + :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + iot_hub_tags=iot_hub_tags, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.IotHubDescription, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IotHubDescription].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IotHubDescription]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = None + if response.status_code == 404: + error = _failsafe_deserialize(_models.ErrorDetails, response) + raise ResourceNotFoundError(response=response, model=error, error_format=ARMErrorFormat) + else: + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.IotHubDescription]: + """Delete an IoT hub. + + Delete an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An instance of AsyncLROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IotHubDescription, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.IotHubDescription].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.IotHubDescription]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.IotHubDescription"]: + """Get all the IoT hubs in a resource group. + + Get all the IoT hubs in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IotHubDescription + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.IotHubDescription"]: + """Get all the IoT hubs in a subscription. + + Get all the IoT hubs in a subscription. + + :return: An iterator like instance of IotHubDescription + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def get_valid_skus( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.IotHubSkuDescription"]: + """Get the list of valid SKUs for an IoT hub. + + Get the list of valid SKUs for an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of IotHubSkuDescription + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubSkuDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubSkuDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_get_valid_skus_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubSkuDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_jobs( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.JobResponse"]: + """Get a list of all the jobs in an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + Get a list of all the jobs in an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of JobResponse + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.JobResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.JobResponse]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_jobs_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.JobResponse], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_job( + self, resource_group_name: str, resource_name: str, job_id: str, **kwargs: Any + ) -> _models.JobResponse: + """Get the details of a job from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + Get the details of a job from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param job_id: The job identifier. Required. + :type job_id: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_job_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + job_id=job_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.JobResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_quota_metrics( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.IotHubQuotaMetricInfo"]: + """Get the quota metrics for an IoT hub. + + Get the quota metrics for an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of IotHubQuotaMetricInfo + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubQuotaMetricInfo]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_get_quota_metrics_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubQuotaMetricInfo], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def get_endpoint_health( + self, resource_group_name: str, iot_hub_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.EndpointHealthData"]: + """Get the health for routing endpoints. + + Get the health for routing endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param iot_hub_name: Required. + :type iot_hub_name: str + :return: An iterator like instance of EndpointHealthData + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.EndpointHealthData] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EndpointHealthData]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_get_endpoint_health_request( + resource_group_name=resource_group_name, + iot_hub_name=iot_hub_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EndpointHealthData], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: _models.TestAllRoutesInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Required. + :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Required. + :type input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Required. + :type input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: Union[_models.TestAllRoutesInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Is one of the following types: TestAllRoutesInput, + JSON, IO[bytes] Required. + :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput or JSON or IO[bytes] + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TestAllRoutesResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(input, (IOBase, bytes)): + _content = input + else: + _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_test_all_routes_request( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TestAllRoutesResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: _models.TestRouteInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Required. + :type input: ~azure.mgmt.iothub.models.TestRouteInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Required. + :type input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Required. + :type input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: Union[_models.TestRouteInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Is one of the following types: TestRouteInput, + JSON, IO[bytes] Required. + :type input: ~azure.mgmt.iothub.models.TestRouteInput or JSON or IO[bytes] + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TestRouteResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(input, (IOBase, bytes)): + _content = input + else: + _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_test_route_request( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TestRouteResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_keys( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.SharedAccessSignatureAuthorizationRule"]: + """Get the security metadata for an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + Get the security metadata for an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of SharedAccessSignatureAuthorizationRule + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SharedAccessSignatureAuthorizationRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_keys_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SharedAccessSignatureAuthorizationRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_keys_for_key_name( + self, resource_group_name: str, resource_name: str, key_name: str, **kwargs: Any + ) -> _models.SharedAccessSignatureAuthorizationRule: + """Get a shared access policy by name from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + Get a shared access policy by name from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param key_name: The name of the shared access policy. Required. + :type key_name: str + :return: SharedAccessSignatureAuthorizationRule. The SharedAccessSignatureAuthorizationRule is + compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SharedAccessSignatureAuthorizationRule] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_keys_for_key_name_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + key_name=key_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SharedAccessSignatureAuthorizationRule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: _models.ExportDevicesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. + Required. + :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. + Required. + :type export_devices_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. + Required. + :type export_devices_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: Union[_models.ExportDevicesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. Is + one of the following types: ExportDevicesRequest, JSON, IO[bytes] Required. + :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest or JSON or + IO[bytes] + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(export_devices_parameters, (IOBase, bytes)): + _content = export_devices_parameters + else: + _content = json.dumps(export_devices_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_export_devices_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.JobResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: _models.ImportDevicesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. + Required. + :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. + Required. + :type import_devices_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. + Required. + :type import_devices_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: Union[_models.ImportDevicesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. Is + one of the following types: ImportDevicesRequest, JSON, IO[bytes] Required. + :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest or JSON or + IO[bytes] + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(import_devices_parameters, (IOBase, bytes)): + _content = import_devices_parameters + else: + _content = json.dumps(import_devices_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_import_devices_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.JobResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_stats( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.RegistryStatistics: + """Get the statistics from an IoT hub. + + Get the statistics from an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: Required. + :type resource_name: str + :return: RegistryStatistics. The RegistryStatistics is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.RegistryStatistics + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RegistryStatistics] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_stats_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RegistryStatistics, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def get_event_hub_consumer_group( + self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. + + Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_event_hub_consumer_group_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EventHubConsumerGroupInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: _models.EventHubConsumerGroupBodyDescription, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Required. + :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Required. + :type consumer_group_body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Required. + :type consumer_group_body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: Union[_models.EventHubConsumerGroupBodyDescription, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Is one of the following types: + EventHubConsumerGroupBodyDescription, JSON, IO[bytes] Required. + :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription or + JSON or IO[bytes] + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(consumer_group_body, (IOBase, bytes)): + _content = consumer_group_body + else: + _content = json.dumps(consumer_group_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_create_event_hub_consumer_group_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + name=name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EventHubConsumerGroupInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_event_hub_consumer_group( + self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any + ) -> None: + """Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. + + Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_delete_event_hub_consumer_group_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_event_hub_consumer_groups( + self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.EventHubConsumerGroupInfo"]: + """Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an + IoT hub. + + Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an + IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :return: An iterator like instance of EventHubConsumerGroupInfo + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EventHubConsumerGroupInfo]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_event_hub_consumer_groups_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EventHubConsumerGroupInfo], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, operation_inputs: _models.OperationInputs, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Required. + :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, operation_inputs: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Required. + :type operation_inputs: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, operation_inputs: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Required. + :type operation_inputs: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, operation_inputs: Union[_models.OperationInputs, JSON, IO[bytes]], **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Is one of the following types: OperationInputs, + JSON, IO[bytes] Required. + :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs or JSON or IO[bytes] + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IotHubNameAvailabilityInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(operation_inputs, (IOBase, bytes)): + _content = operation_inputs + else: + _content = json.dumps(operation_inputs, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_check_name_availability_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IotHubNameAvailabilityInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class IotHubOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.aio.IotHubClient`'s + :attr:`iot_hub` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + async def _manual_failover_initial( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: Union[_models.FailoverInput, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(failover_input, (IOBase, bytes)): + _content = failover_input + else: + _content = json.dumps(failover_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_manual_failover_request( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: _models.FailoverInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Required. + :type failover_input: ~azure.mgmt.iothub.models.FailoverInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Required. + :type failover_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Required. + :type failover_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: Union[_models.FailoverInput, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Is one of the + following types: FailoverInput, JSON, IO[bytes] Required. + :type failover_input: ~azure.mgmt.iothub.models.FailoverInput or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._manual_failover_initial( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + failover_input=failover_input, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class CertificatesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.aio.IotHubClient`'s + :attr:`certificates` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, certificate_name: str, **kwargs: Any + ) -> _models.CertificateDescription: + """Get the certificate. + + Returns the certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) + + _request = build_certificates_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: _models.CertificateDescription, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Required. + :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Required. + :type certificate_description: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Required. + :type certificate_description: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: Union[_models.CertificateDescription, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Is one of the following types: + CertificateDescription, JSON, IO[bytes] Required. + :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(certificate_description, (IOBase, bytes)): + _content = certificate_description + else: + _content = json.dumps(certificate_description, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_certificates_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Delete an X509 certificate. + + Deletes an existing X509 certificate or does nothing if it does not exist. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_certificates_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def list_by_iot_hub( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.CertificateListDescription: + """Get the certificate list. + + Returns the list of certificates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: CertificateListDescription. The CertificateListDescription is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateListDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateListDescription] = kwargs.pop("cls", None) + + _request = build_certificates_list_by_iot_hub_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateListDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def generate_verification_code( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.CertificateWithNonceDescription: + """Generate verification code for proof of possession flow. + + Generates verification code for proof of possession flow. The verification code will be used to + generate a leaf certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateWithNonceDescription. The CertificateWithNonceDescription is compatible + with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateWithNonceDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateWithNonceDescription] = kwargs.pop("cls", None) + + _request = build_certificates_generate_verification_code_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateWithNonceDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: _models.CertificateVerificationDescription, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Required. + :type certificate_verification_body: + ~azure.mgmt.iothub.models.CertificateVerificationDescription + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Required. + :type certificate_verification_body: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Required. + :type certificate_verification_body: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: Union[_models.CertificateVerificationDescription, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Is one of the following + types: CertificateVerificationDescription, JSON, IO[bytes] Required. + :type certificate_verification_body: + ~azure.mgmt.iothub.models.CertificateVerificationDescription or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(certificate_verification_body, (IOBase, bytes)): + _content = certificate_verification_body + else: + _content = json.dumps(certificate_verification_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_certificates_verify_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.aio.IotHubClient`'s + :attr:`private_link_resources` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, resource_name: str, group_id: str, **kwargs: Any + ) -> _models.GroupIdInformation: + """Get the specified private link resource. + + Get the specified private link resource for the given IotHub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param group_id: The name of the private link resource. Required. + :type group_id: str + :return: GroupIdInformation. The GroupIdInformation is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.GroupIdInformation + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupIdInformation] = kwargs.pop("cls", None) + + _request = build_private_link_resources_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupIdInformation, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.PrivateLinkResources: + """List private link resources. + + List private link resources for the given IotHub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :return: PrivateLinkResources. The PrivateLinkResources is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.PrivateLinkResources + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResources] = kwargs.pop("cls", None) + + _request = build_private_link_resources_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResources, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ResourceProviderCommonOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.aio.IotHubClient`'s + :attr:`resource_provider_common` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get_subscription_quota(self, **kwargs: Any) -> _models.UserSubscriptionQuotaListResult: + """Get the number of iot hubs in the subscription. + + Get the number of free and paid iot hubs in the subscription. + + :return: UserSubscriptionQuotaListResult. The UserSubscriptionQuotaListResult is compatible + with MutableMapping + :rtype: ~azure.mgmt.iothub.models.UserSubscriptionQuotaListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserSubscriptionQuotaListResult] = kwargs.pop("cls", None) + + _request = build_resource_provider_common_get_subscription_quota_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserSubscriptionQuotaListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_endpoint_connections_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index 6e4ce9ac65f3..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,524 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._private_endpoint_connections_operations import ( - build_delete_request, - build_get_request, - build_list_request, - build_update_request, -) -from .._configuration import IotHubClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.aio.IotHubClient`'s - :attr:`private_endpoint_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> List[_models.PrivateEndpointConnection]: - """List private endpoint connections. - - List private endpoint connection properties. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: list of PrivateEndpointConnection or the result of cls(response) - :rtype: list[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) - - _request = build_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("[PrivateEndpointConnection]", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Get private endpoint connection. - - Get private endpoint connection properties. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _update_initial( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(private_endpoint_connection, (IOBase, bytes)): - _content = private_endpoint_connection - else: - _json = self._serialize.body(private_endpoint_connection, "PrivateEndpointConnection") - - _request = build_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: _models.PrivateEndpointConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Update private endpoint connection. - - Update the status of a private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The private endpoint connection with updated properties. - Required. - :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Update private endpoint connection. - - Update the status of a private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The private endpoint connection with updated properties. - Required. - :type private_endpoint_connection: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Update private endpoint connection. - - Update the status of a private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The private endpoint connection with updated properties. Is - either a PrivateEndpointConnection type or a IO[bytes] type. Required. - :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint_connection=private_endpoint_connection, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Delete private endpoint connection. - - Delete private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_link_resources_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_link_resources_operations.py deleted file mode 100644 index 0bb9fae2105f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,172 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._private_link_resources_operations import build_get_request, build_list_request -from .._configuration import IotHubClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class PrivateLinkResourcesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.aio.IotHubClient`'s - :attr:`private_link_resources` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.PrivateLinkResources: - """List private link resources. - - List private link resources for the given IotHub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: PrivateLinkResources or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.PrivateLinkResources - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResources] = kwargs.pop("cls", None) - - _request = build_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResources", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get( - self, resource_group_name: str, resource_name: str, group_id: str, **kwargs: Any - ) -> _models.GroupIdInformation: - """Get the specified private link resource. - - Get the specified private link resource for the given IotHub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param group_id: The name of the private link resource. Required. - :type group_id: str - :return: GroupIdInformation or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.GroupIdInformation - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupIdInformation] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GroupIdInformation", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_resource_provider_common_operations.py deleted file mode 100644 index 10923346d627..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_resource_provider_common_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._resource_provider_common_operations import build_get_subscription_quota_request -from .._configuration import IotHubClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class ResourceProviderCommonOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.aio.IotHubClient`'s - :attr:`resource_provider_common` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get_subscription_quota(self, **kwargs: Any) -> _models.UserSubscriptionQuotaListResult: - """Get the number of iot hubs in the subscription. - - Get the number of free and paid iot hubs in the subscription. - - :return: UserSubscriptionQuotaListResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.UserSubscriptionQuotaListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserSubscriptionQuotaListResult] = kwargs.pop("cls", None) - - _request = build_get_subscription_quota_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserSubscriptionQuotaListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py index f0cb1310025c..6dfc6826d2fb 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,10 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import -from ._models_py3 import ( # type: ignore +from ._models import ( # type: ignore ArmIdentity, ArmUserIdentity, - CertificateBodyDescription, CertificateDescription, CertificateListDescription, CertificateProperties, @@ -27,13 +26,11 @@ DeviceRegistry, EncryptionPropertiesDescription, EndpointHealthData, - EndpointHealthDataListResult, EnrichmentProperties, ErrorDetails, EventHubConsumerGroupBodyDescription, EventHubConsumerGroupInfo, EventHubConsumerGroupName, - EventHubConsumerGroupsListResult, EventHubProperties, ExportDevicesRequest, FailoverInput, @@ -44,19 +41,15 @@ ImportDevicesRequest, IotHubCapacity, IotHubDescription, - IotHubDescriptionListResult, IotHubLocationDescription, IotHubNameAvailabilityInfo, IotHubProperties, IotHubPropertiesDeviceStreams, IotHubQuotaMetricInfo, - IotHubQuotaMetricInfoListResult, IotHubSkuDescription, - IotHubSkuDescriptionListResult, IotHubSkuInfo, IpFilterRule, JobResponse, - JobResponseListResult, KeyVaultKeyProperties, ManagedIdentity, MatchedRoute, @@ -67,12 +60,12 @@ Operation, OperationDisplay, OperationInputs, - OperationListResult, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionProperties, PrivateLinkResources, PrivateLinkServiceConnectionState, + ProxyResource, RegistryStatistics, Resource, RootCertificateProperties, @@ -91,7 +84,6 @@ RoutingTwin, RoutingTwinProperties, SharedAccessSignatureAuthorizationRule, - SharedAccessSignatureAuthorizationRuleListResult, StorageEndpointProperties, SystemData, TagsResource, @@ -100,11 +92,12 @@ TestRouteInput, TestRouteResult, TestRouteResultDetails, + TrackedResource, UserSubscriptionQuota, UserSubscriptionQuotaListResult, ) -from ._iot_hub_client_enums import ( # type: ignore +from ._enums import ( # type: ignore AccessRights, AuthenticationType, Capabilities, @@ -136,7 +129,6 @@ __all__ = [ "ArmIdentity", "ArmUserIdentity", - "CertificateBodyDescription", "CertificateDescription", "CertificateListDescription", "CertificateProperties", @@ -147,13 +139,11 @@ "DeviceRegistry", "EncryptionPropertiesDescription", "EndpointHealthData", - "EndpointHealthDataListResult", "EnrichmentProperties", "ErrorDetails", "EventHubConsumerGroupBodyDescription", "EventHubConsumerGroupInfo", "EventHubConsumerGroupName", - "EventHubConsumerGroupsListResult", "EventHubProperties", "ExportDevicesRequest", "FailoverInput", @@ -164,19 +154,15 @@ "ImportDevicesRequest", "IotHubCapacity", "IotHubDescription", - "IotHubDescriptionListResult", "IotHubLocationDescription", "IotHubNameAvailabilityInfo", "IotHubProperties", "IotHubPropertiesDeviceStreams", "IotHubQuotaMetricInfo", - "IotHubQuotaMetricInfoListResult", "IotHubSkuDescription", - "IotHubSkuDescriptionListResult", "IotHubSkuInfo", "IpFilterRule", "JobResponse", - "JobResponseListResult", "KeyVaultKeyProperties", "ManagedIdentity", "MatchedRoute", @@ -187,12 +173,12 @@ "Operation", "OperationDisplay", "OperationInputs", - "OperationListResult", "PrivateEndpoint", "PrivateEndpointConnection", "PrivateEndpointConnectionProperties", "PrivateLinkResources", "PrivateLinkServiceConnectionState", + "ProxyResource", "RegistryStatistics", "Resource", "RootCertificateProperties", @@ -211,7 +197,6 @@ "RoutingTwin", "RoutingTwinProperties", "SharedAccessSignatureAuthorizationRule", - "SharedAccessSignatureAuthorizationRuleListResult", "StorageEndpointProperties", "SystemData", "TagsResource", @@ -220,6 +205,7 @@ "TestRouteInput", "TestRouteResult", "TestRouteResultDetails", + "TrackedResource", "UserSubscriptionQuota", "UserSubscriptionQuotaListResult", "AccessRights", diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_enums.py similarity index 74% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_enums.py index 87aa4b8893ce..027c5b43ddbc 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_enums.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -14,52 +14,77 @@ class AccessRights(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The permissions assigned to the shared access policy.""" REGISTRY_READ = "RegistryRead" + """RegistryRead.""" REGISTRY_WRITE = "RegistryWrite" + """RegistryWrite.""" SERVICE_CONNECT = "ServiceConnect" + """ServiceConnect.""" DEVICE_CONNECT = "DeviceConnect" + """DeviceConnect.""" REGISTRY_READ_REGISTRY_WRITE = "RegistryRead, RegistryWrite" + """RegistryRead, RegistryWrite.""" REGISTRY_READ_SERVICE_CONNECT = "RegistryRead, ServiceConnect" + """RegistryRead, ServiceConnect.""" REGISTRY_READ_DEVICE_CONNECT = "RegistryRead, DeviceConnect" + """RegistryRead, DeviceConnect.""" REGISTRY_WRITE_SERVICE_CONNECT = "RegistryWrite, ServiceConnect" + """RegistryWrite, ServiceConnect.""" REGISTRY_WRITE_DEVICE_CONNECT = "RegistryWrite, DeviceConnect" + """RegistryWrite, DeviceConnect.""" SERVICE_CONNECT_DEVICE_CONNECT = "ServiceConnect, DeviceConnect" + """ServiceConnect, DeviceConnect.""" REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT = "RegistryRead, RegistryWrite, ServiceConnect" + """RegistryRead, RegistryWrite, ServiceConnect.""" REGISTRY_READ_REGISTRY_WRITE_DEVICE_CONNECT = "RegistryRead, RegistryWrite, DeviceConnect" + """RegistryRead, RegistryWrite, DeviceConnect.""" REGISTRY_READ_SERVICE_CONNECT_DEVICE_CONNECT = "RegistryRead, ServiceConnect, DeviceConnect" + """RegistryRead, ServiceConnect, DeviceConnect.""" REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT = "RegistryWrite, ServiceConnect, DeviceConnect" + """RegistryWrite, ServiceConnect, DeviceConnect.""" REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT = ( "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" ) + """RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect.""" class AuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specifies authentication type being used for connecting to the storage account.""" KEY_BASED = "keyBased" + """keyBased.""" IDENTITY_BASED = "identityBased" + """identityBased.""" class Capabilities(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The capabilities and features enabled for the IoT hub.""" NONE = "None" + """None.""" DEVICE_MANAGEMENT = "DeviceManagement" + """DeviceManagement.""" class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" + """The kind of entity that created the resource.""" USER = "User" + """The entity was created by a user.""" APPLICATION = "Application" + """The entity was created by an application.""" MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" KEY = "Key" + """The entity was created by a key.""" class DefaultAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Default Action for Network Rule Set.""" DENY = "Deny" + """Deny.""" ALLOW = "Allow" + """Allow.""" class EndpointHealthStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -75,17 +100,24 @@ class EndpointHealthStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ UNKNOWN = "unknown" + """unknown.""" HEALTHY = "healthy" + """healthy.""" DEGRADED = "degraded" + """degraded.""" UNHEALTHY = "unhealthy" + """unhealthy.""" DEAD = "dead" + """dead.""" class IotHubNameUnavailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The reason for unavailability.""" INVALID = "Invalid" + """Invalid.""" ALREADY_EXISTS = "AlreadyExists" + """AlreadyExists.""" class IotHubReplicaRoleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -95,101 +127,145 @@ class IotHubReplicaRoleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ PRIMARY = "primary" + """primary.""" SECONDARY = "secondary" + """secondary.""" class IotHubScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the scaling enabled.""" AUTOMATIC = "Automatic" + """Automatic.""" MANUAL = "Manual" + """Manual.""" NONE = "None" + """None.""" class IotHubSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The name of the SKU.""" F1 = "F1" + """F1.""" S1 = "S1" + """S1.""" S2 = "S2" + """S2.""" S3 = "S3" + """S3.""" B1 = "B1" + """B1.""" B2 = "B2" + """B2.""" B3 = "B3" + """B3.""" GEN2 = "GEN2" + """GEN2.""" class IotHubSkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The billing tier for the IoT hub.""" FREE = "Free" + """Free.""" STANDARD = "Standard" + """Standard.""" BASIC = "Basic" + """Basic.""" GENERATION2 = "Generation2" + """Generation2.""" class IpFilterActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The desired action for requests captured by this rule.""" ACCEPT = "Accept" + """Accept.""" REJECT = "Reject" + """Reject.""" class IpVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): """This property specifies the IP Version the hub is currently utilizing.""" IPV4 = "ipv4" + """ipv4.""" IPV6 = "ipv6" + """ipv6.""" IPV4_IPV6 = "ipv4ipv6" + """ipv4ipv6.""" class JobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The status of the job.""" UNKNOWN = "unknown" + """unknown.""" ENQUEUED = "enqueued" + """enqueued.""" RUNNING = "running" + """running.""" COMPLETED = "completed" + """completed.""" FAILED = "failed" + """failed.""" CANCELLED = "cancelled" + """cancelled.""" class JobType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of the job.""" UNKNOWN = "unknown" + """unknown.""" EXPORT = "export" + """export.""" IMPORT = "import" + """import.""" BACKUP = "backup" + """backup.""" READ_DEVICE_PROPERTIES = "readDeviceProperties" + """readDeviceProperties.""" WRITE_DEVICE_PROPERTIES = "writeDeviceProperties" + """writeDeviceProperties.""" UPDATE_DEVICE_CONFIGURATION = "updateDeviceConfiguration" + """updateDeviceConfiguration.""" REBOOT_DEVICE = "rebootDevice" + """rebootDevice.""" FACTORY_RESET_DEVICE = "factoryResetDevice" + """factoryResetDevice.""" FIRMWARE_UPDATE = "firmwareUpdate" - IMPORT_ENUM = "import" + """firmwareUpdate.""" class NetworkRuleIPAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): """IP Filter Action.""" ALLOW = "Allow" + """Allow.""" class PrivateLinkServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The status of a private endpoint connection.""" PENDING = "Pending" + """Pending.""" APPROVED = "Approved" + """Approved.""" REJECTED = "Rejected" + """Rejected.""" DISCONNECTED = "Disconnected" + """Disconnected.""" class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Whether requests from Public Network are allowed.""" ENABLED = "Enabled" + """Enabled.""" DISABLED = "Disabled" + """Disabled.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -199,44 +275,66 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ SYSTEM_ASSIGNED = "SystemAssigned" + """SystemAssigned.""" USER_ASSIGNED = "UserAssigned" + """UserAssigned.""" SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + """SystemAssigned, UserAssigned.""" NONE = "None" + """None.""" class RouteErrorSeverity(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Severity of the route error.""" ERROR = "error" + """error.""" WARNING = "warning" + """warning.""" class RoutingSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The source that the routing rule is to be applied to, such as DeviceMessages.""" INVALID = "Invalid" + """Invalid.""" DEVICE_MESSAGES = "DeviceMessages" + """DeviceMessages.""" TWIN_CHANGE_EVENTS = "TwinChangeEvents" + """TwinChangeEvents.""" DEVICE_LIFECYCLE_EVENTS = "DeviceLifecycleEvents" + """DeviceLifecycleEvents.""" DEVICE_JOB_LIFECYCLE_EVENTS = "DeviceJobLifecycleEvents" + """DeviceJobLifecycleEvents.""" DIGITAL_TWIN_CHANGE_EVENTS = "DigitalTwinChangeEvents" + """DigitalTwinChangeEvents.""" DEVICE_CONNECTION_STATE_EVENTS = "DeviceConnectionStateEvents" + """DeviceConnectionStateEvents.""" MQTT_BROKER_MESSAGES = "MqttBrokerMessages" + """MqttBrokerMessages.""" -class RoutingStorageContainerPropertiesEncoding(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class RoutingStorageContainerPropertiesEncoding( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): """Encoding that is used to serialize messages to blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'. """ AVRO = "Avro" + """Avro.""" AVRO_DEFLATE = "AvroDeflate" + """AvroDeflate.""" JSON = "JSON" + """JSON.""" class TestResultStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Result of testing route.""" UNDEFINED = "undefined" + """undefined.""" FALSE = "false" + """false.""" TRUE = "true" + """true.""" diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py new file mode 100644 index 000000000000..d57ac566b49b --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py @@ -0,0 +1,3942 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +import datetime +from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .._utils.model_base import Model as _Model, rest_field + +if TYPE_CHECKING: + from .. import models as _models + + +class ArmIdentity(_Model): + """ArmIdentity. + + :ivar principal_id: Principal Id. + :vartype principal_id: str + :ivar tenant_id: Tenant Id. + :vartype tenant_id: str + :ivar type: The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' + includes both an implicitly created identity and a set of user assigned identities. The type + 'None' will remove any identities from the service. Known values are: "SystemAssigned", + "UserAssigned", "SystemAssigned, UserAssigned", and "None". + :vartype type: str or ~azure.mgmt.iothub.models.ResourceIdentityType + :ivar user_assigned_identities: Dictionary of . + :vartype user_assigned_identities: dict[str, ~azure.mgmt.iothub.models.ArmUserIdentity] + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """Principal Id.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """Tenant Id.""" + type: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes + both an implicitly created identity and a set of user assigned identities. The type 'None' will + remove any identities from the service. Known values are: \"SystemAssigned\", \"UserAssigned\", + \"SystemAssigned, UserAssigned\", and \"None\".""" + user_assigned_identities: Optional[dict[str, "_models.ArmUserIdentity"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """Dictionary of .""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, + user_assigned_identities: Optional[dict[str, "_models.ArmUserIdentity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ArmUserIdentity(_Model): + """ArmUserIdentity. + + :ivar principal_id: + :vartype principal_id: str + :ivar client_id: + :vartype client_id: str + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) + + +class Resource(_Model): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.iothub.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.iothub.models.SystemData + """ + + +class CertificateDescription(ProxyResource): + """The X509 Certificate. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.iothub.models.SystemData + :ivar properties: The description of an X509 CA Certificate. + :vartype properties: ~azure.mgmt.iothub.models.CertificateProperties + :ivar etag: The entity tag. + :vartype etag: str + """ + + properties: Optional["_models.CertificateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The description of an X509 CA Certificate.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """The entity tag.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.CertificateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateListDescription(_Model): + """The JSON-serialized array of Certificate objects. + + :ivar value: The array of Certificate objects. + :vartype value: list[~azure.mgmt.iothub.models.CertificateDescription] + """ + + value: Optional[list["_models.CertificateDescription"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The array of Certificate objects.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.CertificateDescription"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateProperties(_Model): + """The description of an X509 CA Certificate. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: ~datetime.datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: ~datetime.datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: ~datetime.datetime + :ivar certificate: The certificate content. + :vartype certificate: str + :ivar policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). + :vartype policy_resource_id: str + """ + + subject: Optional[str] = rest_field(visibility=["read"]) + """The certificate's subject name.""" + expiry: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc7231") + """The certificate's expiration date and time.""" + thumbprint: Optional[str] = rest_field(visibility=["read"]) + """The certificate's thumbprint.""" + is_verified: Optional[bool] = rest_field( + name="isVerified", visibility=["read", "create", "update", "delete", "query"] + ) + """Determines whether certificate has been verified.""" + created: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc7231") + """The certificate's create date and time.""" + updated: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc7231") + """The certificate's last update date and time.""" + certificate: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The certificate content.""" + policy_resource_id: Optional[str] = rest_field( + name="policyResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The reference to policy stored in Azure Device Registry (ADR).""" + + @overload + def __init__( + self, + *, + is_verified: Optional[bool] = None, + certificate: Optional[str] = None, + policy_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificatePropertiesWithNonce(_Model): + """The description of an X509 CA Certificate including the challenge nonce issued for the + Proof-Of-Possession flow. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: ~datetime.datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: ~datetime.datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: ~datetime.datetime + :ivar verification_code: The certificate's verification code that will be used for proof of + possession. + :vartype verification_code: str + :ivar certificate: The certificate content. + :vartype certificate: str + :ivar policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). + :vartype policy_resource_id: str + """ + + subject: Optional[str] = rest_field(visibility=["read"]) + """The certificate's subject name.""" + expiry: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc7231") + """The certificate's expiration date and time.""" + thumbprint: Optional[str] = rest_field(visibility=["read"]) + """The certificate's thumbprint.""" + is_verified: Optional[bool] = rest_field(name="isVerified", visibility=["read"]) + """Determines whether certificate has been verified.""" + created: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc7231") + """The certificate's create date and time.""" + updated: Optional[datetime.datetime] = rest_field(visibility=["read"], format="rfc7231") + """The certificate's last update date and time.""" + verification_code: Optional[str] = rest_field(name="verificationCode", visibility=["read"]) + """The certificate's verification code that will be used for proof of possession.""" + certificate: Optional[str] = rest_field(visibility=["read"]) + """The certificate content.""" + policy_resource_id: Optional[str] = rest_field( + name="policyResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The reference to policy stored in Azure Device Registry (ADR).""" + + @overload + def __init__( + self, + *, + policy_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateVerificationDescription(_Model): + """The JSON-serialized leaf certificate. + + :ivar certificate: base-64 representation of X509 certificate .cer file or just .pem file + content. + :vartype certificate: str + """ + + certificate: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """base-64 representation of X509 certificate .cer file or just .pem file content.""" + + @overload + def __init__( + self, + *, + certificate: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CertificateWithNonceDescription(_Model): + """The X509 Certificate. + + :ivar properties: The description of an X509 CA Certificate including the challenge nonce + issued for the Proof-Of-Possession flow. + :vartype properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + properties: Optional["_models.CertificatePropertiesWithNonce"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The description of an X509 CA Certificate including the challenge nonce issued for the + Proof-Of-Possession flow.""" + id: Optional[str] = rest_field(visibility=["read"]) + """The resource identifier.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the certificate.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """The entity tag.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The resource type.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.CertificatePropertiesWithNonce"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CloudToDeviceProperties(_Model): + """The IoT hub cloud-to-device messaging properties. + + :ivar max_delivery_count: The max delivery count for cloud-to-device messages in the device + queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_. + :vartype max_delivery_count: int + :ivar default_ttl_as_iso8601: The default time to live for cloud-to-device messages in the + device queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_. + :vartype default_ttl_as_iso8601: ~datetime.timedelta + :ivar feedback: The properties of the feedback queue for cloud-to-device messages. + :vartype feedback: ~azure.mgmt.iothub.models.FeedbackProperties + """ + + max_delivery_count: Optional[int] = rest_field( + name="maxDeliveryCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The max delivery count for cloud-to-device messages in the device queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_.""" + default_ttl_as_iso8601: Optional[datetime.timedelta] = rest_field( + name="defaultTtlAsIso8601", visibility=["read", "create", "update", "delete", "query"] + ) + """The default time to live for cloud-to-device messages in the device queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_.""" + feedback: Optional["_models.FeedbackProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the feedback queue for cloud-to-device messages.""" + + @overload + def __init__( + self, + *, + max_delivery_count: Optional[int] = None, + default_ttl_as_iso8601: Optional[datetime.timedelta] = None, + feedback: Optional["_models.FeedbackProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DeviceRegistry(_Model): + """Represents properties related to the Azure Device Registry (ADR). + + :ivar namespace_resource_id: The identifier of the Azure Device Registry namespace associated + with the GEN2 SKU hub. + :vartype namespace_resource_id: str + :ivar identity_resource_id: The identity used to manage the ADR namespace from the data plane. + :vartype identity_resource_id: str + """ + + namespace_resource_id: Optional[str] = rest_field( + name="namespaceResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The identifier of the Azure Device Registry namespace associated with the GEN2 SKU hub.""" + identity_resource_id: Optional[str] = rest_field( + name="identityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity used to manage the ADR namespace from the data plane.""" + + @overload + def __init__( + self, + *, + namespace_resource_id: Optional[str] = None, + identity_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EncryptionPropertiesDescription(_Model): + """The encryption properties for the IoT hub. + + :ivar key_source: The source of the key. + :vartype key_source: str + :ivar key_vault_properties: The properties of the KeyVault key. + :vartype key_vault_properties: list[~azure.mgmt.iothub.models.KeyVaultKeyProperties] + """ + + key_source: Optional[str] = rest_field(name="keySource", visibility=["read", "create", "update", "delete", "query"]) + """The source of the key.""" + key_vault_properties: Optional[list["_models.KeyVaultKeyProperties"]] = rest_field( + name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the KeyVault key.""" + + @overload + def __init__( + self, + *, + key_source: Optional[str] = None, + key_vault_properties: Optional[list["_models.KeyVaultKeyProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointHealthData(_Model): + """The health data for an endpoint. + + :ivar endpoint_id: Id of the endpoint. + :vartype endpoint_id: str + :ivar health_status: Health statuses have following meanings. The 'healthy' status shows that + the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint + is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. + The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an + eventually consistent state of health. The 'dead' status shows that the endpoint is not + accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub + metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that + the IoT Hub has not established a connection with the endpoint. No messages have been delivered + to or rejected from this endpoint. Known values are: "unknown", "healthy", "degraded", + "unhealthy", and "dead". + :vartype health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus + :ivar last_known_error: Last error obtained when a message failed to be delivered to iot hub. + :vartype last_known_error: str + :ivar last_known_error_time: Time at which the last known error occurred. + :vartype last_known_error_time: ~datetime.datetime + :ivar last_successful_send_attempt_time: Last time iot hub successfully sent a message to the + endpoint. + :vartype last_successful_send_attempt_time: ~datetime.datetime + :ivar last_send_attempt_time: Last time iot hub tried to send a message to the endpoint. + :vartype last_send_attempt_time: ~datetime.datetime + """ + + endpoint_id: Optional[str] = rest_field( + name="endpointId", visibility=["read", "create", "update", "delete", "query"] + ) + """Id of the endpoint.""" + health_status: Optional[Union[str, "_models.EndpointHealthStatus"]] = rest_field( + name="healthStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """Health statuses have following meanings. The 'healthy' status shows that the endpoint is + accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting + messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an + unhealthy endpoint will be updated to healthy when IoT Hub has established an eventually + consistent state of health. The 'dead' status shows that the endpoint is not accepting + messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub metrics to + identify errors and monitor issues with endpoints. The 'unknown' status shows that the IoT Hub + has not established a connection with the endpoint. No messages have been delivered to or + rejected from this endpoint. Known values are: \"unknown\", \"healthy\", \"degraded\", + \"unhealthy\", and \"dead\".""" + last_known_error: Optional[str] = rest_field( + name="lastKnownError", visibility=["read", "create", "update", "delete", "query"] + ) + """Last error obtained when a message failed to be delivered to iot hub.""" + last_known_error_time: Optional[datetime.datetime] = rest_field( + name="lastKnownErrorTime", visibility=["read", "create", "update", "delete", "query"], format="rfc7231" + ) + """Time at which the last known error occurred.""" + last_successful_send_attempt_time: Optional[datetime.datetime] = rest_field( + name="lastSuccessfulSendAttemptTime", + visibility=["read", "create", "update", "delete", "query"], + format="rfc7231", + ) + """Last time iot hub successfully sent a message to the endpoint.""" + last_send_attempt_time: Optional[datetime.datetime] = rest_field( + name="lastSendAttemptTime", visibility=["read", "create", "update", "delete", "query"], format="rfc7231" + ) + """Last time iot hub tried to send a message to the endpoint.""" + + @overload + def __init__( + self, + *, + endpoint_id: Optional[str] = None, + health_status: Optional[Union[str, "_models.EndpointHealthStatus"]] = None, + last_known_error: Optional[str] = None, + last_known_error_time: Optional[datetime.datetime] = None, + last_successful_send_attempt_time: Optional[datetime.datetime] = None, + last_send_attempt_time: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EnrichmentProperties(_Model): + """The properties of an enrichment that your IoT hub applies to messages delivered to endpoints. + + :ivar key: The key or name for the enrichment property. Required. + :vartype key: str + :ivar value: The value for the enrichment property. Required. + :vartype value: str + :ivar endpoint_names: The list of endpoints for which the enrichment is applied to the message. + Required. + :vartype endpoint_names: list[str] + """ + + key: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The key or name for the enrichment property. Required.""" + value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The value for the enrichment property. Required.""" + endpoint_names: list[str] = rest_field( + name="endpointNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of endpoints for which the enrichment is applied to the message. Required.""" + + @overload + def __init__( + self, + *, + key: str, + value: str, + endpoint_names: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorDetails(_Model): + """Error details. + + :ivar code: The error code. + :vartype code: str + :ivar http_status_code: The HTTP status code. + :vartype http_status_code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: str + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """The error code.""" + http_status_code: Optional[str] = rest_field(name="httpStatusCode", visibility=["read"]) + """The HTTP status code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The error message.""" + details: Optional[str] = rest_field(visibility=["read"]) + """The error details.""" + + +class EventHubConsumerGroupBodyDescription(_Model): + """The EventHub consumer group. + + :ivar properties: The EventHub consumer group name. Required. + :vartype properties: ~azure.mgmt.iothub.models.EventHubConsumerGroupName + """ + + properties: "_models.EventHubConsumerGroupName" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The EventHub consumer group name. Required.""" + + @overload + def __init__( + self, + *, + properties: "_models.EventHubConsumerGroupName", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventHubConsumerGroupInfo(ProxyResource): + """The properties of the EventHubConsumerGroupInfo object. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.iothub.models.SystemData + :ivar properties: The tags. + :vartype properties: dict[str, any] + :ivar etag: The etag. + :vartype etag: str + """ + + properties: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The tags.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """The etag.""" + + @overload + def __init__( + self, + *, + properties: Optional[dict[str, Any]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventHubConsumerGroupName(_Model): + """The EventHub consumer group name. + + :ivar name: EventHub consumer group name. Required. + :vartype name: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """EventHub consumer group name. Required.""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventHubProperties(_Model): + """The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub. + + :ivar retention_time_in_days: The retention time for device-to-cloud messages in days. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + `_. + :vartype retention_time_in_days: int + :ivar partition_count: The number of partitions for receiving device-to-cloud messages in the + Event Hub-compatible endpoint. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + `_. + :vartype partition_count: int + :ivar partition_ids: The partition ids in the Event Hub-compatible endpoint. + :vartype partition_ids: list[str] + :ivar path: The Event Hub-compatible name. + :vartype path: str + :ivar endpoint: The Event Hub-compatible endpoint. + :vartype endpoint: str + """ + + retention_time_in_days: Optional[int] = rest_field( + name="retentionTimeInDays", visibility=["read", "create", "update", "delete", "query"] + ) + """The retention time for device-to-cloud messages in days. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + `_.""" + partition_count: Optional[int] = rest_field( + name="partitionCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of partitions for receiving device-to-cloud messages in the Event Hub-compatible + endpoint. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + `_.""" + partition_ids: Optional[list[str]] = rest_field(name="partitionIds", visibility=["read"]) + """The partition ids in the Event Hub-compatible endpoint.""" + path: Optional[str] = rest_field(visibility=["read"]) + """The Event Hub-compatible name.""" + endpoint: Optional[str] = rest_field(visibility=["read"]) + """The Event Hub-compatible endpoint.""" + + @overload + def __init__( + self, + *, + retention_time_in_days: Optional[int] = None, + partition_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExportDevicesRequest(_Model): + """Use to provide parameters when requesting an export of all devices in the IoT hub. + + :ivar export_blob_container_uri: The export blob container URI. Required. + :vartype export_blob_container_uri: str + :ivar exclude_keys: The value indicating whether keys should be excluded during export. + Required. + :vartype exclude_keys: bool + :ivar export_blob_name: The name of the blob that will be created in the provided output blob + container. This blob will contain the exported device registry information for the IoT Hub. + :vartype export_blob_name: str + :ivar authentication_type: Specifies authentication type being used for connecting to the + storage account. Known values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of storage endpoint for export devices. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + :ivar include_configurations: The value indicating whether configurations should be exported. + :vartype include_configurations: bool + :ivar configurations_blob_name: The name of the blob that will be created in the provided + output blob container. This blob will contain the exported configurations for the Iot Hub. + :vartype configurations_blob_name: str + """ + + export_blob_container_uri: str = rest_field( + name="exportBlobContainerUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The export blob container URI. Required.""" + exclude_keys: bool = rest_field(name="excludeKeys", visibility=["read", "create", "update", "delete", "query"]) + """The value indicating whether keys should be excluded during export. Required.""" + export_blob_name: Optional[str] = rest_field( + name="exportBlobName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the blob that will be created in the provided output blob container. This blob will + contain the exported device registry information for the IoT Hub.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies authentication type being used for connecting to the storage account. Known values + are: \"keyBased\" and \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of storage endpoint for export devices.""" + include_configurations: Optional[bool] = rest_field( + name="includeConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """The value indicating whether configurations should be exported.""" + configurations_blob_name: Optional[str] = rest_field( + name="configurationsBlobName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the blob that will be created in the provided output blob container. This blob will + contain the exported configurations for the Iot Hub.""" + + @overload + def __init__( + self, + *, + export_blob_container_uri: str, + exclude_keys: bool, + export_blob_name: Optional[str] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + include_configurations: Optional[bool] = None, + configurations_blob_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FailoverInput(_Model): + """Use to provide failover region when requesting manual Failover for a hub. + + :ivar failover_region: Region the hub will be failed over to. Required. + :vartype failover_region: str + """ + + failover_region: str = rest_field(name="failoverRegion", visibility=["read", "create", "update", "delete", "query"]) + """Region the hub will be failed over to. Required.""" + + @overload + def __init__( + self, + *, + failover_region: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FallbackRouteProperties(_Model): + """The properties of the fallback route. IoT Hub uses these properties when it routes messages to + the fallback endpoint. + + :ivar name: The name of the route. The name can only include alphanumeric characters, periods, + underscores, hyphens, has a maximum length of 64 characters, and must be unique. + :vartype name: str + :ivar source: The source to which the routing rule is to be applied to. For example, + DeviceMessages. Required. Known values are: "Invalid", "DeviceMessages", "TwinChangeEvents", + "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", "DigitalTwinChangeEvents", + "DeviceConnectionStateEvents", and "MqttBrokerMessages". + :vartype source: str or ~azure.mgmt.iothub.models.RoutingSource + :ivar condition: The condition which is evaluated in order to apply the fallback route. If the + condition is not provided it will evaluate to true by default. For grammar, See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + `_. + :vartype condition: str + :ivar endpoint_names: The list of endpoints to which the messages that satisfy the condition + are routed to. Currently only 1 endpoint is allowed. Required. + :vartype endpoint_names: list[str] + :ivar is_enabled: Used to specify whether the fallback route is enabled. Required. + :vartype is_enabled: bool + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the route. The name can only include alphanumeric characters, periods, underscores, + hyphens, has a maximum length of 64 characters, and must be unique.""" + source: Union[str, "_models.RoutingSource"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The source to which the routing rule is to be applied to. For example, DeviceMessages. + Required. Known values are: \"Invalid\", \"DeviceMessages\", \"TwinChangeEvents\", + \"DeviceLifecycleEvents\", \"DeviceJobLifecycleEvents\", \"DigitalTwinChangeEvents\", + \"DeviceConnectionStateEvents\", and \"MqttBrokerMessages\".""" + condition: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The condition which is evaluated in order to apply the fallback route. If the condition is not + provided it will evaluate to true by default. For grammar, See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + `_.""" + endpoint_names: list[str] = rest_field( + name="endpointNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of endpoints to which the messages that satisfy the condition are routed to. Currently + only 1 endpoint is allowed. Required.""" + is_enabled: bool = rest_field(name="isEnabled", visibility=["read", "create", "update", "delete", "query"]) + """Used to specify whether the fallback route is enabled. Required.""" + + @overload + def __init__( + self, + *, + source: Union[str, "_models.RoutingSource"], + endpoint_names: list[str], + is_enabled: bool, + name: Optional[str] = None, + condition: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FeedbackProperties(_Model): + """The properties of the feedback queue for cloud-to-device messages. + + :ivar lock_duration_as_iso8601: The lock duration for the feedback queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_. + :vartype lock_duration_as_iso8601: ~datetime.timedelta + :ivar ttl_as_iso8601: The period of time for which a message is available to consume before it + is expired by the IoT hub. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_. + :vartype ttl_as_iso8601: ~datetime.timedelta + :ivar max_delivery_count: The number of times the IoT hub attempts to deliver a message on the + feedback queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_. + :vartype max_delivery_count: int + """ + + lock_duration_as_iso8601: Optional[datetime.timedelta] = rest_field( + name="lockDurationAsIso8601", visibility=["read", "create", "update", "delete", "query"] + ) + """The lock duration for the feedback queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_.""" + ttl_as_iso8601: Optional[datetime.timedelta] = rest_field( + name="ttlAsIso8601", visibility=["read", "create", "update", "delete", "query"] + ) + """The period of time for which a message is available to consume before it is expired by the IoT + hub. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_.""" + max_delivery_count: Optional[int] = rest_field( + name="maxDeliveryCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of times the IoT hub attempts to deliver a message on the feedback queue. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages + `_.""" + + @overload + def __init__( + self, + *, + lock_duration_as_iso8601: Optional[datetime.timedelta] = None, + ttl_as_iso8601: Optional[datetime.timedelta] = None, + max_delivery_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GroupIdInformation(_Model): + """The group information for creating a private endpoint on an IotHub. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar properties: The properties for a group information object. Required. + :vartype properties: ~azure.mgmt.iothub.models.GroupIdInformationProperties + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """The resource identifier.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The resource name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The resource type.""" + properties: "_models.GroupIdInformationProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties for a group information object. Required.""" + + @overload + def __init__( + self, + *, + properties: "_models.GroupIdInformationProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GroupIdInformationProperties(_Model): + """The properties for a group information object. + + :ivar group_id: The group id. + :vartype group_id: str + :ivar required_members: The required members for a specific group id. + :vartype required_members: list[str] + :ivar required_zone_names: The required DNS zones for a specific group id. + :vartype required_zone_names: list[str] + """ + + group_id: Optional[str] = rest_field(name="groupId", visibility=["read", "create", "update", "delete", "query"]) + """The group id.""" + required_members: Optional[list[str]] = rest_field( + name="requiredMembers", visibility=["read", "create", "update", "delete", "query"] + ) + """The required members for a specific group id.""" + required_zone_names: Optional[list[str]] = rest_field( + name="requiredZoneNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The required DNS zones for a specific group id.""" + + @overload + def __init__( + self, + *, + group_id: Optional[str] = None, + required_members: Optional[list[str]] = None, + required_zone_names: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ImportDevicesRequest(_Model): + """Use to provide parameters when requesting an import of all devices in the hub. + + :ivar input_blob_container_uri: The input blob container URI. Required. + :vartype input_blob_container_uri: str + :ivar output_blob_container_uri: The output blob container URI. Required. + :vartype output_blob_container_uri: str + :ivar input_blob_name: The blob name to be used when importing from the provided input blob + container. + :vartype input_blob_name: str + :ivar output_blob_name: The blob name to use for storing the status of the import job. + :vartype output_blob_name: str + :ivar authentication_type: Specifies authentication type being used for connecting to the + storage account. Known values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of storage endpoint for import devices. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + :ivar include_configurations: The value indicating whether configurations should be imported. + :vartype include_configurations: bool + :ivar configurations_blob_name: The blob name to be used when importing configurations from the + provided input blob container. + :vartype configurations_blob_name: str + """ + + input_blob_container_uri: str = rest_field( + name="inputBlobContainerUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The input blob container URI. Required.""" + output_blob_container_uri: str = rest_field( + name="outputBlobContainerUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The output blob container URI. Required.""" + input_blob_name: Optional[str] = rest_field( + name="inputBlobName", visibility=["read", "create", "update", "delete", "query"] + ) + """The blob name to be used when importing from the provided input blob container.""" + output_blob_name: Optional[str] = rest_field( + name="outputBlobName", visibility=["read", "create", "update", "delete", "query"] + ) + """The blob name to use for storing the status of the import job.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies authentication type being used for connecting to the storage account. Known values + are: \"keyBased\" and \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of storage endpoint for import devices.""" + include_configurations: Optional[bool] = rest_field( + name="includeConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """The value indicating whether configurations should be imported.""" + configurations_blob_name: Optional[str] = rest_field( + name="configurationsBlobName", visibility=["read", "create", "update", "delete", "query"] + ) + """The blob name to be used when importing configurations from the provided input blob container.""" + + @overload + def __init__( + self, + *, + input_blob_container_uri: str, + output_blob_container_uri: str, + input_blob_name: Optional[str] = None, + output_blob_name: Optional[str] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + include_configurations: Optional[bool] = None, + configurations_blob_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubCapacity(_Model): + """IoT Hub capacity information. + + :ivar minimum: The minimum number of units. + :vartype minimum: int + :ivar maximum: The maximum number of units. + :vartype maximum: int + :ivar default: The default number of units. + :vartype default: int + :ivar scale_type: The type of the scaling enabled. Known values are: "Automatic", "Manual", and + "None". + :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType + """ + + minimum: Optional[int] = rest_field(visibility=["read"]) + """The minimum number of units.""" + maximum: Optional[int] = rest_field(visibility=["read"]) + """The maximum number of units.""" + default: Optional[int] = rest_field(visibility=["read"]) + """The default number of units.""" + scale_type: Optional[Union[str, "_models.IotHubScaleType"]] = rest_field(name="scaleType", visibility=["read"]) + """The type of the scaling enabled. Known values are: \"Automatic\", \"Manual\", and \"None\".""" + + +class TrackedResource(Resource): + """Tracked Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.iothub.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubDescription(TrackedResource): + """The description of the IoT hub. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.iothub.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: IotHub properties. + :vartype properties: ~azure.mgmt.iothub.models.IotHubProperties + :ivar etag: The Etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal ETag convention. + :vartype etag: str + :ivar sku: IotHub SKU info. Required. + :vartype sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + :ivar identity: The managed identities for the IotHub. + :vartype identity: ~azure.mgmt.iothub.models.ArmIdentity + """ + + properties: Optional["_models.IotHubProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IotHub properties.""" + etag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The Etag field is *not* required. If it is provided in the response body, it must also be + provided as a header per the normal ETag convention.""" + sku: "_models.IotHubSkuInfo" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IotHub SKU info. Required.""" + identity: Optional["_models.ArmIdentity"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The managed identities for the IotHub.""" + + @overload + def __init__( + self, + *, + location: str, + sku: "_models.IotHubSkuInfo", + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.IotHubProperties"] = None, + etag: Optional[str] = None, + identity: Optional["_models.ArmIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubLocationDescription(_Model): + """Public representation of one of the locations where a resource is provisioned. + + :ivar location: The name of the Azure region. + :vartype location: str + :ivar role: The role of the region, can be either primary or secondary. The primary region is + where the IoT hub is currently provisioned. The secondary region is the Azure disaster recovery + (DR) paired region and also the region where the IoT hub can failover to. Known values are: + "primary" and "secondary". + :vartype role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType + """ + + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the Azure region.""" + role: Optional[Union[str, "_models.IotHubReplicaRoleType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The role of the region, can be either primary or secondary. The primary region is where the IoT + hub is currently provisioned. The secondary region is the Azure disaster recovery (DR) paired + region and also the region where the IoT hub can failover to. Known values are: \"primary\" and + \"secondary\".""" + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + role: Optional[Union[str, "_models.IotHubReplicaRoleType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubNameAvailabilityInfo(_Model): + """The properties indicating whether a given IoT hub name is available. + + :ivar name_available: The value which indicates whether the provided name is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Known values are: "Invalid" and "AlreadyExists". + :vartype reason: str or ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason + :ivar message: The detailed reason message. + :vartype message: str + """ + + name_available: Optional[bool] = rest_field(name="nameAvailable", visibility=["read"]) + """The value which indicates whether the provided name is available.""" + reason: Optional[Union[str, "_models.IotHubNameUnavailabilityReason"]] = rest_field(visibility=["read"]) + """The reason for unavailability. Known values are: \"Invalid\" and \"AlreadyExists\".""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The detailed reason message.""" + + @overload + def __init__( + self, + *, + message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubProperties(_Model): + """The properties of an IoT hub. + + :ivar authorization_policies: The shared access policies you can use to secure a connection to + the IoT hub. + :vartype authorization_policies: + list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :ivar disable_local_auth: If true, SAS tokens with Iot hub scoped SAS keys cannot be used for + authentication. + :vartype disable_local_auth: bool + :ivar disable_device_sas: If true, all device(including Edge devices but excluding modules) + scoped SAS keys cannot be used for authentication. + :vartype disable_device_sas: bool + :ivar disable_module_sas: If true, all module scoped SAS keys cannot be used for + authentication. + :vartype disable_module_sas: bool + :ivar restrict_outbound_network_access: If true, egress from IotHub will be restricted to only + the allowed FQDNs that are configured via allowedFqdnList. + :vartype restrict_outbound_network_access: bool + :ivar allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from Iot + Hub. + :vartype allowed_fqdn_list: list[str] + :ivar public_network_access: Whether requests from Public Network are allowed. Known values + are: "Enabled" and "Disabled". + :vartype public_network_access: str or ~azure.mgmt.iothub.models.PublicNetworkAccess + :ivar ip_filter_rules: The IP filter rules. + :vartype ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] + :ivar network_rule_sets: Network Rule Set Properties of IotHub. + :vartype network_rule_sets: ~azure.mgmt.iothub.models.NetworkRuleSetProperties + :ivar min_tls_version: Specifies the minimum TLS version to support for this hub. Can be set to + "1.2" to have clients that use a TLS version below 1.2 to be rejected. + :vartype min_tls_version: str + :ivar private_endpoint_connections: Private endpoint connections created on this IotHub. + :vartype private_endpoint_connections: + list[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :ivar state: The hub state. + :vartype state: str + :ivar host_name: The name of the host. + :vartype host_name: str + :ivar event_hub_endpoints: The Event Hub-compatible endpoint properties. The only possible keys + to this dictionary is events. This key has to be present in the dictionary while making create + or update calls for the IoT hub. + :vartype event_hub_endpoints: dict[str, ~azure.mgmt.iothub.models.EventHubProperties] + :ivar routing: The routing related properties of the IoT hub. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging + `_. + :vartype routing: ~azure.mgmt.iothub.models.RoutingProperties + :ivar storage_endpoints: The list of Azure Storage endpoints where you can upload files. + Currently you can configure only one Azure Storage account and that MUST have its key as + $default. Specifying more than one storage account causes an error to be thrown. Not specifying + a value for this property when the enableFileUploadNotifications property is set to True, + causes an error to be thrown. + :vartype storage_endpoints: dict[str, ~azure.mgmt.iothub.models.StorageEndpointProperties] + :ivar messaging_endpoints: The messaging endpoint properties for the file upload notification + queue. + :vartype messaging_endpoints: dict[str, ~azure.mgmt.iothub.models.MessagingEndpointProperties] + :ivar enable_file_upload_notifications: If True, file upload notifications are enabled. + :vartype enable_file_upload_notifications: bool + :ivar cloud_to_device: The IoT hub cloud-to-device messaging properties. + :vartype cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties + :ivar comments: IoT hub comments. + :vartype comments: str + :ivar device_streams: The device streams properties of iothub. + :vartype device_streams: ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams + :ivar features: The capabilities and features enabled for the IoT hub. Known values are: "None" + and "DeviceManagement". + :vartype features: str or ~azure.mgmt.iothub.models.Capabilities + :ivar encryption: The encryption properties for the IoT hub. + :vartype encryption: ~azure.mgmt.iothub.models.EncryptionPropertiesDescription + :ivar locations: Primary and secondary location for iot hub. + :vartype locations: list[~azure.mgmt.iothub.models.IotHubLocationDescription] + :ivar enable_data_residency: This property when set to true, will enable data residency, thus, + disabling disaster recovery. + :vartype enable_data_residency: bool + :ivar root_certificate: This property store root certificate related information. + :vartype root_certificate: ~azure.mgmt.iothub.models.RootCertificateProperties + :ivar ip_version: This property specifies the IP Version the hub is currently utilizing. Known + values are: "ipv4", "ipv6", and "ipv4ipv6". + :vartype ip_version: str or ~azure.mgmt.iothub.models.IpVersion + :ivar device_registry: Represents properties related to the Azure Device Registry (ADR). + :vartype device_registry: ~azure.mgmt.iothub.models.DeviceRegistry + """ + + authorization_policies: Optional[list["_models.SharedAccessSignatureAuthorizationRule"]] = rest_field( + name="authorizationPolicies", visibility=["read", "create", "update", "delete", "query"] + ) + """The shared access policies you can use to secure a connection to the IoT hub.""" + disable_local_auth: Optional[bool] = rest_field( + name="disableLocalAuth", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication.""" + disable_device_sas: Optional[bool] = rest_field( + name="disableDeviceSAS", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, all device(including Edge devices but excluding modules) scoped SAS keys cannot be + used for authentication.""" + disable_module_sas: Optional[bool] = rest_field( + name="disableModuleSAS", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, all module scoped SAS keys cannot be used for authentication.""" + restrict_outbound_network_access: Optional[bool] = rest_field( + name="restrictOutboundNetworkAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """If true, egress from IotHub will be restricted to only the allowed FQDNs that are configured + via allowedFqdnList.""" + allowed_fqdn_list: Optional[list[str]] = rest_field( + name="allowedFqdnList", visibility=["read", "create", "update", "delete", "query"] + ) + """List of allowed FQDNs(Fully Qualified Domain Name) for egress from Iot Hub.""" + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field( + name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether requests from Public Network are allowed. Known values are: \"Enabled\" and + \"Disabled\".""" + ip_filter_rules: Optional[list["_models.IpFilterRule"]] = rest_field( + name="ipFilterRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The IP filter rules.""" + network_rule_sets: Optional["_models.NetworkRuleSetProperties"] = rest_field( + name="networkRuleSets", visibility=["read", "create", "update", "delete", "query"] + ) + """Network Rule Set Properties of IotHub.""" + min_tls_version: Optional[str] = rest_field( + name="minTlsVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the minimum TLS version to support for this hub. Can be set to \"1.2\" to have + clients that use a TLS version below 1.2 to be rejected.""" + private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field( + name="privateEndpointConnections", visibility=["read", "create", "update", "delete", "query"] + ) + """Private endpoint connections created on this IotHub.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """The provisioning state.""" + state: Optional[str] = rest_field(visibility=["read"]) + """The hub state.""" + host_name: Optional[str] = rest_field(name="hostName", visibility=["read"]) + """The name of the host.""" + event_hub_endpoints: Optional[dict[str, "_models.EventHubProperties"]] = rest_field( + name="eventHubEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """The Event Hub-compatible endpoint properties. The only possible keys to this dictionary is + events. This key has to be present in the dictionary while making create or update calls for + the IoT hub.""" + routing: Optional["_models.RoutingProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The routing related properties of the IoT hub. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging + `_.""" + storage_endpoints: Optional[dict[str, "_models.StorageEndpointProperties"]] = rest_field( + name="storageEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Azure Storage endpoints where you can upload files. Currently you can configure + only one Azure Storage account and that MUST have its key as $default. Specifying more than one + storage account causes an error to be thrown. Not specifying a value for this property when the + enableFileUploadNotifications property is set to True, causes an error to be thrown.""" + messaging_endpoints: Optional[dict[str, "_models.MessagingEndpointProperties"]] = rest_field( + name="messagingEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """The messaging endpoint properties for the file upload notification queue.""" + enable_file_upload_notifications: Optional[bool] = rest_field( + name="enableFileUploadNotifications", visibility=["read", "create", "update", "delete", "query"] + ) + """If True, file upload notifications are enabled.""" + cloud_to_device: Optional["_models.CloudToDeviceProperties"] = rest_field( + name="cloudToDevice", visibility=["read", "create", "update", "delete", "query"] + ) + """The IoT hub cloud-to-device messaging properties.""" + comments: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IoT hub comments.""" + device_streams: Optional["_models.IotHubPropertiesDeviceStreams"] = rest_field( + name="deviceStreams", visibility=["read", "create", "update", "delete", "query"] + ) + """The device streams properties of iothub.""" + features: Optional[Union[str, "_models.Capabilities"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The capabilities and features enabled for the IoT hub. Known values are: \"None\" and + \"DeviceManagement\".""" + encryption: Optional["_models.EncryptionPropertiesDescription"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The encryption properties for the IoT hub.""" + locations: Optional[list["_models.IotHubLocationDescription"]] = rest_field(visibility=["read"]) + """Primary and secondary location for iot hub.""" + enable_data_residency: Optional[bool] = rest_field( + name="enableDataResidency", visibility=["read", "create", "update", "delete", "query"] + ) + """This property when set to true, will enable data residency, thus, disabling disaster recovery.""" + root_certificate: Optional["_models.RootCertificateProperties"] = rest_field( + name="rootCertificate", visibility=["read", "create", "update", "delete", "query"] + ) + """This property store root certificate related information.""" + ip_version: Optional[Union[str, "_models.IpVersion"]] = rest_field( + name="ipVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """This property specifies the IP Version the hub is currently utilizing. Known values are: + \"ipv4\", \"ipv6\", and \"ipv4ipv6\".""" + device_registry: Optional["_models.DeviceRegistry"] = rest_field( + name="deviceRegistry", visibility=["read", "create", "update", "delete", "query"] + ) + """Represents properties related to the Azure Device Registry (ADR).""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + authorization_policies: Optional[list["_models.SharedAccessSignatureAuthorizationRule"]] = None, + disable_local_auth: Optional[bool] = None, + disable_device_sas: Optional[bool] = None, + disable_module_sas: Optional[bool] = None, + restrict_outbound_network_access: Optional[bool] = None, + allowed_fqdn_list: Optional[list[str]] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + ip_filter_rules: Optional[list["_models.IpFilterRule"]] = None, + network_rule_sets: Optional["_models.NetworkRuleSetProperties"] = None, + min_tls_version: Optional[str] = None, + private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = None, + event_hub_endpoints: Optional[dict[str, "_models.EventHubProperties"]] = None, + routing: Optional["_models.RoutingProperties"] = None, + storage_endpoints: Optional[dict[str, "_models.StorageEndpointProperties"]] = None, + messaging_endpoints: Optional[dict[str, "_models.MessagingEndpointProperties"]] = None, + enable_file_upload_notifications: Optional[bool] = None, + cloud_to_device: Optional["_models.CloudToDeviceProperties"] = None, + comments: Optional[str] = None, + device_streams: Optional["_models.IotHubPropertiesDeviceStreams"] = None, + features: Optional[Union[str, "_models.Capabilities"]] = None, + encryption: Optional["_models.EncryptionPropertiesDescription"] = None, + enable_data_residency: Optional[bool] = None, + root_certificate: Optional["_models.RootCertificateProperties"] = None, + ip_version: Optional[Union[str, "_models.IpVersion"]] = None, + device_registry: Optional["_models.DeviceRegistry"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubPropertiesDeviceStreams(_Model): + """The device streams properties of iothub. + + :ivar streaming_endpoints: List of Device Streams Endpoints. + :vartype streaming_endpoints: list[str] + """ + + streaming_endpoints: Optional[list[str]] = rest_field( + name="streamingEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """List of Device Streams Endpoints.""" + + @overload + def __init__( + self, + *, + streaming_endpoints: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubQuotaMetricInfo(_Model): + """Quota metrics properties. + + :ivar name: The name of the quota metric. + :vartype name: str + :ivar current_value: The current value for the quota metric. + :vartype current_value: int + :ivar max_value: The maximum value of the quota metric. + :vartype max_value: int + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the quota metric.""" + current_value: Optional[int] = rest_field(name="currentValue", visibility=["read"]) + """The current value for the quota metric.""" + max_value: Optional[int] = rest_field(name="maxValue", visibility=["read"]) + """The maximum value of the quota metric.""" + + +class IotHubSkuDescription(_Model): + """SKU properties. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar sku: The type of the resource. Required. + :vartype sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + :ivar capacity: IotHub capacity. Required. + :vartype capacity: ~azure.mgmt.iothub.models.IotHubCapacity + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """The type of the resource.""" + sku: "_models.IotHubSkuInfo" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of the resource. Required.""" + capacity: "_models.IotHubCapacity" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IotHub capacity. Required.""" + + @overload + def __init__( + self, + *, + sku: "_models.IotHubSkuInfo", + capacity: "_models.IotHubCapacity", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubSkuInfo(_Model): + """Information about the SKU of the IoT hub. + + :ivar name: The name of the SKU. Required. Known values are: "F1", "S1", "S2", "S3", "B1", + "B2", "B3", and "GEN2". + :vartype name: str or ~azure.mgmt.iothub.models.IotHubSku + :ivar tier: The billing tier for the IoT hub. Known values are: "Free", "Standard", "Basic", + and "Generation2". + :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier + :ivar capacity: The number of provisioned IoT Hub units. See: + `https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits + `_. + :vartype capacity: int + """ + + name: Union[str, "_models.IotHubSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the SKU. Required. Known values are: \"F1\", \"S1\", \"S2\", \"S3\", \"B1\", + \"B2\", \"B3\", and \"GEN2\".""" + tier: Optional[Union[str, "_models.IotHubSkuTier"]] = rest_field(visibility=["read"]) + """The billing tier for the IoT hub. Known values are: \"Free\", \"Standard\", \"Basic\", and + \"Generation2\".""" + capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The number of provisioned IoT Hub units. See: + `https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits + `_.""" + + @overload + def __init__( + self, + *, + name: Union[str, "_models.IotHubSku"], + capacity: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IpFilterRule(_Model): + """The IP filter rules for the IoT hub. + + :ivar filter_name: The name of the IP filter rule. Required. + :vartype filter_name: str + :ivar action: The desired action for requests captured by this rule. Required. Known values + are: "Accept" and "Reject". + :vartype action: str or ~azure.mgmt.iothub.models.IpFilterActionType + :ivar ip_mask: A string that contains the IP address range in CIDR notation for the rule. + Required. + :vartype ip_mask: str + """ + + filter_name: str = rest_field(name="filterName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the IP filter rule. Required.""" + action: Union[str, "_models.IpFilterActionType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The desired action for requests captured by this rule. Required. Known values are: \"Accept\" + and \"Reject\".""" + ip_mask: str = rest_field(name="ipMask", visibility=["read", "create", "update", "delete", "query"]) + """A string that contains the IP address range in CIDR notation for the rule. Required.""" + + @overload + def __init__( + self, + *, + filter_name: str, + action: Union[str, "_models.IpFilterActionType"], + ip_mask: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class JobResponse(_Model): + """The properties of the Job Response object. + + :ivar job_id: The job identifier. + :vartype job_id: str + :ivar start_time_utc: The start time of the job. + :vartype start_time_utc: ~datetime.datetime + :ivar end_time_utc: The time the job stopped processing. + :vartype end_time_utc: ~datetime.datetime + :ivar type: The type of the job. Known values are: "unknown", "export", "import", "backup", + "readDeviceProperties", "writeDeviceProperties", "updateDeviceConfiguration", "rebootDevice", + "factoryResetDevice", and "firmwareUpdate". + :vartype type: str or ~azure.mgmt.iothub.models.JobType + :ivar status: The status of the job. Known values are: "unknown", "enqueued", "running", + "completed", "failed", and "cancelled". + :vartype status: str or ~azure.mgmt.iothub.models.JobStatus + :ivar failure_reason: If status == failed, this string containing the reason for the failure. + :vartype failure_reason: str + :ivar status_message: The status message for the job. + :vartype status_message: str + :ivar parent_job_id: The job identifier of the parent job, if any. + :vartype parent_job_id: str + """ + + job_id: Optional[str] = rest_field(name="jobId", visibility=["read"]) + """The job identifier.""" + start_time_utc: Optional[datetime.datetime] = rest_field(name="startTimeUtc", visibility=["read"], format="rfc7231") + """The start time of the job.""" + end_time_utc: Optional[datetime.datetime] = rest_field(name="endTimeUtc", visibility=["read"], format="rfc7231") + """The time the job stopped processing.""" + type: Optional[Union[str, "_models.JobType"]] = rest_field(visibility=["read"]) + """The type of the job. Known values are: \"unknown\", \"export\", \"import\", \"backup\", + \"readDeviceProperties\", \"writeDeviceProperties\", \"updateDeviceConfiguration\", + \"rebootDevice\", \"factoryResetDevice\", and \"firmwareUpdate\".""" + status: Optional[Union[str, "_models.JobStatus"]] = rest_field(visibility=["read"]) + """The status of the job. Known values are: \"unknown\", \"enqueued\", \"running\", \"completed\", + \"failed\", and \"cancelled\".""" + failure_reason: Optional[str] = rest_field(name="failureReason", visibility=["read"]) + """If status == failed, this string containing the reason for the failure.""" + status_message: Optional[str] = rest_field(name="statusMessage", visibility=["read"]) + """The status message for the job.""" + parent_job_id: Optional[str] = rest_field(name="parentJobId", visibility=["read"]) + """The job identifier of the parent job, if any.""" + + +class KeyVaultKeyProperties(_Model): + """The properties of the KeyVault key. + + :ivar key_identifier: The identifier of the key. + :vartype key_identifier: str + :ivar identity: Managed identity properties of KeyVault Key. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + """ + + key_identifier: Optional[str] = rest_field( + name="keyIdentifier", visibility=["read", "create", "update", "delete", "query"] + ) + """The identifier of the key.""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of KeyVault Key.""" + + @overload + def __init__( + self, + *, + key_identifier: Optional[str] = None, + identity: Optional["_models.ManagedIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedIdentity(_Model): + """The properties of the Managed identity. + + :ivar user_assigned_identity: The user assigned identity. + :vartype user_assigned_identity: str + """ + + user_assigned_identity: Optional[str] = rest_field( + name="userAssignedIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The user assigned identity.""" + + @overload + def __init__( + self, + *, + user_assigned_identity: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MatchedRoute(_Model): + """Routes that matched. + + :ivar properties: Properties of routes that matched. + :vartype properties: ~azure.mgmt.iothub.models.RouteProperties + """ + + properties: Optional["_models.RouteProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of routes that matched.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.RouteProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class MessagingEndpointProperties(_Model): + """The properties of the messaging endpoints used by this IoT hub. + + :ivar lock_duration_as_iso8601: The lock duration. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload + `_. + :vartype lock_duration_as_iso8601: ~datetime.timedelta + :ivar ttl_as_iso8601: The period of time for which a message is available to consume before it + is expired by the IoT hub. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload + `_. + :vartype ttl_as_iso8601: ~datetime.timedelta + :ivar max_delivery_count: The number of times the IoT hub attempts to deliver a message. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload + `_. + :vartype max_delivery_count: int + """ + + lock_duration_as_iso8601: Optional[datetime.timedelta] = rest_field( + name="lockDurationAsIso8601", visibility=["read", "create", "update", "delete", "query"] + ) + """The lock duration. See: `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload + `_.""" + ttl_as_iso8601: Optional[datetime.timedelta] = rest_field( + name="ttlAsIso8601", visibility=["read", "create", "update", "delete", "query"] + ) + """The period of time for which a message is available to consume before it is expired by the IoT + hub. See: `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload + `_.""" + max_delivery_count: Optional[int] = rest_field( + name="maxDeliveryCount", visibility=["read", "create", "update", "delete", "query"] + ) + """The number of times the IoT hub attempts to deliver a message. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload + `_.""" + + @overload + def __init__( + self, + *, + lock_duration_as_iso8601: Optional[datetime.timedelta] = None, + ttl_as_iso8601: Optional[datetime.timedelta] = None, + max_delivery_count: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Name(_Model): + """Name of Iot Hub type. + + :ivar value: IotHub type. + :vartype value: str + :ivar localized_value: Localized value of name. + :vartype localized_value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IotHub type.""" + localized_value: Optional[str] = rest_field( + name="localizedValue", visibility=["read", "create", "update", "delete", "query"] + ) + """Localized value of name.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + localized_value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkRuleSetIpRule(_Model): + """IP Rule to be applied as part of Network Rule Set. + + :ivar filter_name: Name of the IP filter rule. Required. + :vartype filter_name: str + :ivar action: IP Filter Action. "Allow" + :vartype action: str or ~azure.mgmt.iothub.models.NetworkRuleIPAction + :ivar ip_mask: A string that contains the IP address range in CIDR notation for the rule. + Required. + :vartype ip_mask: str + """ + + filter_name: str = rest_field(name="filterName", visibility=["read", "create", "update", "delete", "query"]) + """Name of the IP filter rule. Required.""" + action: Optional[Union[str, "_models.NetworkRuleIPAction"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """IP Filter Action. \"Allow\"""" + ip_mask: str = rest_field(name="ipMask", visibility=["read", "create", "update", "delete", "query"]) + """A string that contains the IP address range in CIDR notation for the rule. Required.""" + + @overload + def __init__( + self, + *, + filter_name: str, + ip_mask: str, + action: Optional[Union[str, "_models.NetworkRuleIPAction"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkRuleSetProperties(_Model): + """Network Rule Set Properties of IotHub. + + :ivar default_action: Default Action for Network Rule Set. Known values are: "Deny" and + "Allow". + :vartype default_action: str or ~azure.mgmt.iothub.models.DefaultAction + :ivar apply_to_built_in_event_hub_endpoint: If True, then Network Rule Set is also applied to + BuiltIn EventHub EndPoint of IotHub. Required. + :vartype apply_to_built_in_event_hub_endpoint: bool + :ivar ip_rules: List of IP Rules. Required. + :vartype ip_rules: list[~azure.mgmt.iothub.models.NetworkRuleSetIpRule] + """ + + default_action: Optional[Union[str, "_models.DefaultAction"]] = rest_field( + name="defaultAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Default Action for Network Rule Set. Known values are: \"Deny\" and \"Allow\".""" + apply_to_built_in_event_hub_endpoint: bool = rest_field( + name="applyToBuiltInEventHubEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub. + Required.""" + ip_rules: list["_models.NetworkRuleSetIpRule"] = rest_field( + name="ipRules", visibility=["read", "create", "update", "delete", "query"] + ) + """List of IP Rules. Required.""" + + @overload + def __init__( + self, + *, + apply_to_built_in_event_hub_endpoint: bool, + ip_rules: list["_models.NetworkRuleSetIpRule"], + default_action: Optional[Union[str, "_models.DefaultAction"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Operation(_Model): + """IoT Hub REST API operation. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. + :vartype name: str + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.iothub.models.OperationDisplay + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """Operation name: {provider}/{resource}/{read | write | action | delete}.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The object that represents the operation.""" + + @overload + def __init__( + self, + *, + display: Optional["_models.OperationDisplay"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationDisplay(_Model): + """The object that represents the operation. + + :ivar provider: Service provider: Microsoft Devices. + :vartype provider: str + :ivar resource: Resource Type: IotHubs. + :vartype resource: str + :ivar operation: Name of the operation. + :vartype operation: str + :ivar description: Description of the operation. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read"]) + """Service provider: Microsoft Devices.""" + resource: Optional[str] = rest_field(visibility=["read"]) + """Resource Type: IotHubs.""" + operation: Optional[str] = rest_field(visibility=["read"]) + """Name of the operation.""" + description: Optional[str] = rest_field(visibility=["read"]) + """Description of the operation.""" + + +class OperationInputs(_Model): + """Input values. + + :ivar name: The name of the IoT hub to check. Required. + :vartype name: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the IoT hub to check. Required.""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpoint(_Model): + """The private endpoint property of a private endpoint connection. + + :ivar id: The resource identifier. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """The resource identifier.""" + + +class PrivateEndpointConnection(ProxyResource): + """The private endpoint connection of an IotHub. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.iothub.models.SystemData + :ivar properties: The properties of a private endpoint connection. Required. + :vartype properties: ~azure.mgmt.iothub.models.PrivateEndpointConnectionProperties + """ + + properties: "_models.PrivateEndpointConnectionProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of a private endpoint connection. Required.""" + + @overload + def __init__( + self, + *, + properties: "_models.PrivateEndpointConnectionProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpointConnectionProperties(_Model): + """The properties of a private endpoint connection. + + :ivar private_endpoint: The private endpoint property of a private endpoint connection. + :vartype private_endpoint: ~azure.mgmt.iothub.models.PrivateEndpoint + :ivar private_link_service_connection_state: The current state of a private endpoint + connection. Required. + :vartype private_link_service_connection_state: + ~azure.mgmt.iothub.models.PrivateLinkServiceConnectionState + """ + + private_endpoint: Optional["_models.PrivateEndpoint"] = rest_field( + name="privateEndpoint", visibility=["read", "create", "update", "delete", "query"] + ) + """The private endpoint property of a private endpoint connection.""" + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState" = rest_field( + name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"] + ) + """The current state of a private endpoint connection. Required.""" + + @overload + def __init__( + self, + *, + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState", + private_endpoint: Optional["_models.PrivateEndpoint"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateLinkResources(_Model): + """The available private link resources for an IotHub. + + :ivar value: The list of available private link resources for an IotHub. + :vartype value: list[~azure.mgmt.iothub.models.GroupIdInformation] + """ + + value: Optional[list["_models.GroupIdInformation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of available private link resources for an IotHub.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.GroupIdInformation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateLinkServiceConnectionState(_Model): + """The current state of a private endpoint connection. + + :ivar status: The status of a private endpoint connection. Required. Known values are: + "Pending", "Approved", "Rejected", and "Disconnected". + :vartype status: str or ~azure.mgmt.iothub.models.PrivateLinkServiceConnectionStatus + :ivar description: The description for the current state of a private endpoint connection. + Required. + :vartype description: str + :ivar actions_required: Actions required for a private endpoint connection. + :vartype actions_required: str + """ + + status: Union[str, "_models.PrivateLinkServiceConnectionStatus"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status of a private endpoint connection. Required. Known values are: \"Pending\", + \"Approved\", \"Rejected\", and \"Disconnected\".""" + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The description for the current state of a private endpoint connection. Required.""" + actions_required: Optional[str] = rest_field( + name="actionsRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """Actions required for a private endpoint connection.""" + + @overload + def __init__( + self, + *, + status: Union[str, "_models.PrivateLinkServiceConnectionStatus"], + description: str, + actions_required: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RegistryStatistics(_Model): + """Identity registry statistics. + + :ivar total_device_count: The total count of devices in the identity registry. + :vartype total_device_count: int + :ivar enabled_device_count: The count of enabled devices in the identity registry. + :vartype enabled_device_count: int + :ivar disabled_device_count: The count of disabled devices in the identity registry. + :vartype disabled_device_count: int + """ + + total_device_count: Optional[int] = rest_field(name="totalDeviceCount", visibility=["read"]) + """The total count of devices in the identity registry.""" + enabled_device_count: Optional[int] = rest_field(name="enabledDeviceCount", visibility=["read"]) + """The count of enabled devices in the identity registry.""" + disabled_device_count: Optional[int] = rest_field(name="disabledDeviceCount", visibility=["read"]) + """The count of disabled devices in the identity registry.""" + + +class RootCertificateProperties(_Model): + """This property store root certificate related information. + + :ivar enable_root_certificate_v2: This property when set to true, hub will use G2 cert; while + it's set to false, hub uses Baltimore Cert. + :vartype enable_root_certificate_v2: bool + :ivar last_updated_time_utc: the last update time to root certificate flag. + :vartype last_updated_time_utc: ~datetime.datetime + """ + + enable_root_certificate_v2: Optional[bool] = rest_field( + name="enableRootCertificateV2", visibility=["read", "create", "update", "delete", "query"] + ) + """This property when set to true, hub will use G2 cert; while it's set to false, hub uses + Baltimore Cert.""" + last_updated_time_utc: Optional[datetime.datetime] = rest_field( + name="lastUpdatedTimeUtc", visibility=["read"], format="rfc3339" + ) + """the last update time to root certificate flag.""" + + @overload + def __init__( + self, + *, + enable_root_certificate_v2: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RouteCompilationError(_Model): + """Compilation error when evaluating route. + + :ivar message: Route error message. + :vartype message: str + :ivar severity: Severity of the route error. Known values are: "error" and "warning". + :vartype severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity + :ivar location: Location where the route error happened. + :vartype location: ~azure.mgmt.iothub.models.RouteErrorRange + """ + + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Route error message.""" + severity: Optional[Union[str, "_models.RouteErrorSeverity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Severity of the route error. Known values are: \"error\" and \"warning\".""" + location: Optional["_models.RouteErrorRange"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Location where the route error happened.""" + + @overload + def __init__( + self, + *, + message: Optional[str] = None, + severity: Optional[Union[str, "_models.RouteErrorSeverity"]] = None, + location: Optional["_models.RouteErrorRange"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RouteErrorPosition(_Model): + """Position where the route error happened. + + :ivar line: Line where the route error happened. + :vartype line: int + :ivar column: Column where the route error happened. + :vartype column: int + """ + + line: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Line where the route error happened.""" + column: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Column where the route error happened.""" + + @overload + def __init__( + self, + *, + line: Optional[int] = None, + column: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RouteErrorRange(_Model): + """Range of route errors. + + :ivar start: Start where the route error happened. + :vartype start: ~azure.mgmt.iothub.models.RouteErrorPosition + :ivar end: End where the route error happened. + :vartype end: ~azure.mgmt.iothub.models.RouteErrorPosition + """ + + start: Optional["_models.RouteErrorPosition"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Start where the route error happened.""" + end: Optional["_models.RouteErrorPosition"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """End where the route error happened.""" + + @overload + def __init__( + self, + *, + start: Optional["_models.RouteErrorPosition"] = None, + end: Optional["_models.RouteErrorPosition"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RouteProperties(_Model): + """The properties of a routing rule that your IoT hub uses to route messages to endpoints. + + :ivar name: The name of the route. The name can only include alphanumeric characters, periods, + underscores, hyphens, has a maximum length of 64 characters, and must be unique. Required. + :vartype name: str + :ivar source: The source that the routing rule is to be applied to, such as DeviceMessages. + Required. Known values are: "Invalid", "DeviceMessages", "TwinChangeEvents", + "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", "DigitalTwinChangeEvents", + "DeviceConnectionStateEvents", and "MqttBrokerMessages". + :vartype source: str or ~azure.mgmt.iothub.models.RoutingSource + :ivar condition: The condition that is evaluated to apply the routing rule. If no condition is + provided, it evaluates to true by default. For grammar, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + `_. + :vartype condition: str + :ivar endpoint_names: The list of endpoints to which messages that satisfy the condition are + routed. Currently only one endpoint is allowed. Required. + :vartype endpoint_names: list[str] + :ivar is_enabled: Used to specify whether a route is enabled. Required. + :vartype is_enabled: bool + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the route. The name can only include alphanumeric characters, periods, underscores, + hyphens, has a maximum length of 64 characters, and must be unique. Required.""" + source: Union[str, "_models.RoutingSource"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The source that the routing rule is to be applied to, such as DeviceMessages. Required. Known + values are: \"Invalid\", \"DeviceMessages\", \"TwinChangeEvents\", \"DeviceLifecycleEvents\", + \"DeviceJobLifecycleEvents\", \"DigitalTwinChangeEvents\", \"DeviceConnectionStateEvents\", and + \"MqttBrokerMessages\".""" + condition: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The condition that is evaluated to apply the routing rule. If no condition is provided, it + evaluates to true by default. For grammar, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + `_.""" + endpoint_names: list[str] = rest_field( + name="endpointNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of endpoints to which messages that satisfy the condition are routed. Currently only + one endpoint is allowed. Required.""" + is_enabled: bool = rest_field(name="isEnabled", visibility=["read", "create", "update", "delete", "query"]) + """Used to specify whether a route is enabled. Required.""" + + @overload + def __init__( + self, + *, + name: str, + source: Union[str, "_models.RoutingSource"], + endpoint_names: list[str], + is_enabled: bool, + condition: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingCosmosDBSqlApiProperties(_Model): + """The properties related to a cosmos DB sql container endpoint. + + :ivar name: The name that identifies this endpoint. The name can only include alphanumeric + characters, periods, underscores, hyphens and has a maximum length of 64 characters. The + following names are reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. Required. + :vartype name: str + :ivar id: Id of the cosmos DB sql container endpoint. + :vartype id: str + :ivar subscription_id: The subscription identifier of the cosmos DB account. + :vartype subscription_id: str + :ivar resource_group: The name of the resource group of the cosmos DB account. + :vartype resource_group: str + :ivar endpoint_uri: The url of the cosmos DB account. It must include the protocol https://. + Required. + :vartype endpoint_uri: str + :ivar authentication_type: Method used to authenticate against the cosmos DB sql container + endpoint. Known values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of routing cosmos DB container endpoint. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + :ivar primary_key: The primary key of the cosmos DB account. + :vartype primary_key: str + :ivar secondary_key: The secondary key of the cosmos DB account. + :vartype secondary_key: str + :ivar database_name: The name of the cosmos DB database in the cosmos DB account. Required. + :vartype database_name: str + :ivar container_name: The name of the cosmos DB sql container in the cosmos DB database. + Required. + :vartype container_name: str + :ivar partition_key_name: The name of the partition key associated with this cosmos DB sql + container if one exists. This is an optional parameter. + :vartype partition_key_name: str + :ivar partition_key_template: The template for generating a synthetic partition key value for + use with this cosmos DB sql container. The template must include at least one of the following + placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be + specified at most once, but order and non-placeholder components are arbitrary. This parameter + is only required if PartitionKeyName is specified. + :vartype partition_key_template: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name that identifies this endpoint. The name can only include alphanumeric characters, + periods, underscores, hyphens and has a maximum length of 64 characters. The following names + are reserved: events, fileNotifications, $default. Endpoint names must be unique across + endpoint types. Required.""" + id: Optional[str] = rest_field(visibility=["read"]) + """Id of the cosmos DB sql container endpoint.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription identifier of the cosmos DB account.""" + resource_group: Optional[str] = rest_field( + name="resourceGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the resource group of the cosmos DB account.""" + endpoint_uri: str = rest_field(name="endpointUri", visibility=["read", "create", "update", "delete", "query"]) + """The url of the cosmos DB account. It must include the protocol https://. Required.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Method used to authenticate against the cosmos DB sql container endpoint. Known values are: + \"keyBased\" and \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of routing cosmos DB container endpoint.""" + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """The primary key of the cosmos DB account.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """The secondary key of the cosmos DB account.""" + database_name: str = rest_field(name="databaseName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the cosmos DB database in the cosmos DB account. Required.""" + container_name: str = rest_field(name="containerName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the cosmos DB sql container in the cosmos DB database. Required.""" + partition_key_name: Optional[str] = rest_field( + name="partitionKeyName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the partition key associated with this cosmos DB sql container if one exists. This + is an optional parameter.""" + partition_key_template: Optional[str] = rest_field( + name="partitionKeyTemplate", visibility=["read", "create", "update", "delete", "query"] + ) + """The template for generating a synthetic partition key value for use with this cosmos DB sql + container. The template must include at least one of the following placeholders: {iothub}, + {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but + order and non-placeholder components are arbitrary. This parameter is only required if + PartitionKeyName is specified.""" + + @overload + def __init__( + self, + *, + name: str, + endpoint_uri: str, + database_name: str, + container_name: str, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + partition_key_name: Optional[str] = None, + partition_key_template: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingEndpoints(_Model): + """The properties related to the custom endpoints to which your IoT hub routes messages based on + the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for + paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs. + + :ivar service_bus_queues: The list of Service Bus queue endpoints that IoT hub routes the + messages to, based on the routing rules. + :vartype service_bus_queues: + list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] + :ivar service_bus_topics: The list of Service Bus topic endpoints that the IoT hub routes the + messages to, based on the routing rules. + :vartype service_bus_topics: + list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] + :ivar event_hubs: The list of Event Hubs endpoints that IoT hub routes messages to, based on + the routing rules. This list does not include the built-in Event Hubs endpoint. + :vartype event_hubs: list[~azure.mgmt.iothub.models.RoutingEventHubProperties] + :ivar storage_containers: The list of storage container endpoints that IoT hub routes messages + to, based on the routing rules. + :vartype storage_containers: list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] + :ivar cosmos_db_sql_containers: The list of Cosmos DB container endpoints that IoT hub routes + messages to, based on the routing rules. + :vartype cosmos_db_sql_containers: + list[~azure.mgmt.iothub.models.RoutingCosmosDBSqlApiProperties] + """ + + service_bus_queues: Optional[list["_models.RoutingServiceBusQueueEndpointProperties"]] = rest_field( + name="serviceBusQueues", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the + routing rules.""" + service_bus_topics: Optional[list["_models.RoutingServiceBusTopicEndpointProperties"]] = rest_field( + name="serviceBusTopics", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the + routing rules.""" + event_hubs: Optional[list["_models.RoutingEventHubProperties"]] = rest_field( + name="eventHubs", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. + This list does not include the built-in Event Hubs endpoint.""" + storage_containers: Optional[list["_models.RoutingStorageContainerProperties"]] = rest_field( + name="storageContainers", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of storage container endpoints that IoT hub routes messages to, based on the routing + rules.""" + cosmos_db_sql_containers: Optional[list["_models.RoutingCosmosDBSqlApiProperties"]] = rest_field( + name="cosmosDBSqlContainers", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing + rules.""" + + @overload + def __init__( + self, + *, + service_bus_queues: Optional[list["_models.RoutingServiceBusQueueEndpointProperties"]] = None, + service_bus_topics: Optional[list["_models.RoutingServiceBusTopicEndpointProperties"]] = None, + event_hubs: Optional[list["_models.RoutingEventHubProperties"]] = None, + storage_containers: Optional[list["_models.RoutingStorageContainerProperties"]] = None, + cosmos_db_sql_containers: Optional[list["_models.RoutingCosmosDBSqlApiProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingEventHubProperties(_Model): + """The properties related to an event hub endpoint. + + :ivar id: Id of the event hub endpoint. + :vartype id: str + :ivar connection_string: The connection string of the event hub endpoint. + :vartype connection_string: str + :ivar endpoint_uri: The url of the event hub endpoint. It must include the protocol sb://. + :vartype endpoint_uri: str + :ivar entity_path: Event hub name on the event hub namespace. + :vartype entity_path: str + :ivar authentication_type: Method used to authenticate against the event hub endpoint. Known + values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of routing event hub endpoint. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + :ivar name: The name that identifies this endpoint. The name can only include alphanumeric + characters, periods, underscores, hyphens and has a maximum length of 64 characters. The + following names are reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. Required. + :vartype name: str + :ivar subscription_id: The subscription identifier of the event hub endpoint. + :vartype subscription_id: str + :ivar resource_group: The name of the resource group of the event hub endpoint. + :vartype resource_group: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Id of the event hub endpoint.""" + connection_string: Optional[str] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """The connection string of the event hub endpoint.""" + endpoint_uri: Optional[str] = rest_field( + name="endpointUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The url of the event hub endpoint. It must include the protocol sb://.""" + entity_path: Optional[str] = rest_field( + name="entityPath", visibility=["read", "create", "update", "delete", "query"] + ) + """Event hub name on the event hub namespace.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Method used to authenticate against the event hub endpoint. Known values are: \"keyBased\" and + \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of routing event hub endpoint.""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name that identifies this endpoint. The name can only include alphanumeric characters, + periods, underscores, hyphens and has a maximum length of 64 characters. The following names + are reserved: events, fileNotifications, $default. Endpoint names must be unique across + endpoint types. Required.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription identifier of the event hub endpoint.""" + resource_group: Optional[str] = rest_field( + name="resourceGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the resource group of the event hub endpoint.""" + + @overload + def __init__( + self, + *, + name: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + connection_string: Optional[str] = None, + endpoint_uri: Optional[str] = None, + entity_path: Optional[str] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingMessage(_Model): + """Routing message. + + :ivar body: Body of routing message. + :vartype body: str + :ivar app_properties: App properties. + :vartype app_properties: dict[str, str] + :ivar system_properties: System properties. + :vartype system_properties: dict[str, str] + """ + + body: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Body of routing message.""" + app_properties: Optional[dict[str, str]] = rest_field( + name="appProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """App properties.""" + system_properties: Optional[dict[str, str]] = rest_field( + name="systemProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """System properties.""" + + @overload + def __init__( + self, + *, + body: Optional[str] = None, + app_properties: Optional[dict[str, str]] = None, + system_properties: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingProperties(_Model): + """The routing related properties of the IoT hub. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging + `_. + + :ivar endpoints: The properties related to the custom endpoints to which your IoT hub routes + messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all + endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types + for free hubs. + :vartype endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints + :ivar routes: The list of user-provided routing rules that the IoT hub uses to route messages + to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and + a maximum of 5 routing rules are allowed for free hubs. + :vartype routes: list[~azure.mgmt.iothub.models.RouteProperties] + :ivar fallback_route: The properties of the route that is used as a fall-back route when none + of the conditions specified in the 'routes' section are met. This is an optional parameter. + When this property is not set, the messages which do not meet any of the conditions specified + in the 'routes' section get routed to the built-in eventhub endpoint. + :vartype fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties + :ivar enrichments: The list of user-provided enrichments that the IoT hub applies to messages + to be delivered to built-in and custom endpoints. See: `https://aka.ms/telemetryoneventgrid + `_. + :vartype enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] + """ + + endpoints: Optional["_models.RoutingEndpoints"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties related to the custom endpoints to which your IoT hub routes messages based on + the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for + paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.""" + routes: Optional[list["_models.RouteProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of user-provided routing rules that the IoT hub uses to route messages to built-in and + custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 + routing rules are allowed for free hubs.""" + fallback_route: Optional["_models.FallbackRouteProperties"] = rest_field( + name="fallbackRoute", visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the route that is used as a fall-back route when none of the conditions + specified in the 'routes' section are met. This is an optional parameter. When this property is + not set, the messages which do not meet any of the conditions specified in the 'routes' section + get routed to the built-in eventhub endpoint.""" + enrichments: Optional[list["_models.EnrichmentProperties"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of user-provided enrichments that the IoT hub applies to messages to be delivered to + built-in and custom endpoints. See: `https://aka.ms/telemetryoneventgrid + `_.""" + + @overload + def __init__( + self, + *, + endpoints: Optional["_models.RoutingEndpoints"] = None, + routes: Optional[list["_models.RouteProperties"]] = None, + fallback_route: Optional["_models.FallbackRouteProperties"] = None, + enrichments: Optional[list["_models.EnrichmentProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingServiceBusQueueEndpointProperties(_Model): + """The properties related to service bus queue endpoint types. + + :ivar id: Id of the service bus queue endpoint. + :vartype id: str + :ivar connection_string: The connection string of the service bus queue endpoint. + :vartype connection_string: str + :ivar endpoint_uri: The url of the service bus queue endpoint. It must include the protocol + sb://. + :vartype endpoint_uri: str + :ivar entity_path: Queue name on the service bus namespace. + :vartype entity_path: str + :ivar authentication_type: Method used to authenticate against the service bus queue endpoint. + Known values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of routing service bus queue endpoint. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + :ivar name: The name that identifies this endpoint. The name can only include alphanumeric + characters, periods, underscores, hyphens and has a maximum length of 64 characters. The + following names are reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual queue name. Required. + :vartype name: str + :ivar subscription_id: The subscription identifier of the service bus queue endpoint. + :vartype subscription_id: str + :ivar resource_group: The name of the resource group of the service bus queue endpoint. + :vartype resource_group: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Id of the service bus queue endpoint.""" + connection_string: Optional[str] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """The connection string of the service bus queue endpoint.""" + endpoint_uri: Optional[str] = rest_field( + name="endpointUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The url of the service bus queue endpoint. It must include the protocol sb://.""" + entity_path: Optional[str] = rest_field( + name="entityPath", visibility=["read", "create", "update", "delete", "query"] + ) + """Queue name on the service bus namespace.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Method used to authenticate against the service bus queue endpoint. Known values are: + \"keyBased\" and \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of routing service bus queue endpoint.""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name that identifies this endpoint. The name can only include alphanumeric characters, + periods, underscores, hyphens and has a maximum length of 64 characters. The following names + are reserved: events, fileNotifications, $default. Endpoint names must be unique across + endpoint types. The name need not be the same as the actual queue name. Required.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription identifier of the service bus queue endpoint.""" + resource_group: Optional[str] = rest_field( + name="resourceGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the resource group of the service bus queue endpoint.""" + + @overload + def __init__( + self, + *, + name: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + connection_string: Optional[str] = None, + endpoint_uri: Optional[str] = None, + entity_path: Optional[str] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingServiceBusTopicEndpointProperties(_Model): + """The properties related to service bus topic endpoint types. + + :ivar id: Id of the service bus topic endpoint. + :vartype id: str + :ivar connection_string: The connection string of the service bus topic endpoint. + :vartype connection_string: str + :ivar endpoint_uri: The url of the service bus topic endpoint. It must include the protocol + sb://. + :vartype endpoint_uri: str + :ivar entity_path: Queue name on the service bus topic. + :vartype entity_path: str + :ivar authentication_type: Method used to authenticate against the service bus topic endpoint. + Known values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of routing service bus topic endpoint. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + :ivar name: The name that identifies this endpoint. The name can only include alphanumeric + characters, periods, underscores, hyphens and has a maximum length of 64 characters. The + following names are reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual topic name. + Required. + :vartype name: str + :ivar subscription_id: The subscription identifier of the service bus topic endpoint. + :vartype subscription_id: str + :ivar resource_group: The name of the resource group of the service bus topic endpoint. + :vartype resource_group: str + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Id of the service bus topic endpoint.""" + connection_string: Optional[str] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """The connection string of the service bus topic endpoint.""" + endpoint_uri: Optional[str] = rest_field( + name="endpointUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The url of the service bus topic endpoint. It must include the protocol sb://.""" + entity_path: Optional[str] = rest_field( + name="entityPath", visibility=["read", "create", "update", "delete", "query"] + ) + """Queue name on the service bus topic.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Method used to authenticate against the service bus topic endpoint. Known values are: + \"keyBased\" and \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of routing service bus topic endpoint.""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name that identifies this endpoint. The name can only include alphanumeric characters, + periods, underscores, hyphens and has a maximum length of 64 characters. The following names + are reserved: events, fileNotifications, $default. Endpoint names must be unique across + endpoint types. The name need not be the same as the actual topic name. Required.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription identifier of the service bus topic endpoint.""" + resource_group: Optional[str] = rest_field( + name="resourceGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the resource group of the service bus topic endpoint.""" + + @overload + def __init__( + self, + *, + name: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + connection_string: Optional[str] = None, + endpoint_uri: Optional[str] = None, + entity_path: Optional[str] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingStorageContainerProperties(_Model): + """The properties related to a storage container endpoint. + + :ivar id: Id of the storage container endpoint. + :vartype id: str + :ivar connection_string: The connection string of the storage account. + :vartype connection_string: str + :ivar endpoint_uri: The url of the storage endpoint. It must include the protocol https://. + :vartype endpoint_uri: str + :ivar authentication_type: Method used to authenticate against the storage endpoint. Known + values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of routing storage endpoint. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + :ivar name: The name that identifies this endpoint. The name can only include alphanumeric + characters, periods, underscores, hyphens and has a maximum length of 64 characters. The + following names are reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. Required. + :vartype name: str + :ivar subscription_id: The subscription identifier of the storage account. + :vartype subscription_id: str + :ivar resource_group: The name of the resource group of the storage account. + :vartype resource_group: str + :ivar container_name: The name of storage container in the storage account. Required. + :vartype container_name: str + :ivar file_name_format: File name format for the blob. Default format is + {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be + reordered. + :vartype file_name_format: str + :ivar batch_frequency_in_seconds: Time interval at which blobs are written to storage. Value + should be between 60 and 720 seconds. Default value is 300 seconds. + :vartype batch_frequency_in_seconds: int + :ivar max_chunk_size_in_bytes: Maximum number of bytes for each blob written to storage. Value + should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). + :vartype max_chunk_size_in_bytes: int + :ivar encoding: Encoding that is used to serialize messages to blobs. Supported values are + 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'. Known values are: "Avro", + "AvroDeflate", and "JSON". + :vartype encoding: str or ~azure.mgmt.iothub.models.RoutingStorageContainerPropertiesEncoding + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Id of the storage container endpoint.""" + connection_string: Optional[str] = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """The connection string of the storage account.""" + endpoint_uri: Optional[str] = rest_field( + name="endpointUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The url of the storage endpoint. It must include the protocol https://.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Method used to authenticate against the storage endpoint. Known values are: \"keyBased\" and + \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of routing storage endpoint.""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name that identifies this endpoint. The name can only include alphanumeric characters, + periods, underscores, hyphens and has a maximum length of 64 characters. The following names + are reserved: events, fileNotifications, $default. Endpoint names must be unique across + endpoint types. Required.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription identifier of the storage account.""" + resource_group: Optional[str] = rest_field( + name="resourceGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the resource group of the storage account.""" + container_name: str = rest_field(name="containerName", visibility=["read", "create", "update", "delete", "query"]) + """The name of storage container in the storage account. Required.""" + file_name_format: Optional[str] = rest_field( + name="fileNameFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """File name format for the blob. Default format is + {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be + reordered.""" + batch_frequency_in_seconds: Optional[int] = rest_field( + name="batchFrequencyInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Time interval at which blobs are written to storage. Value should be between 60 and 720 + seconds. Default value is 300 seconds.""" + max_chunk_size_in_bytes: Optional[int] = rest_field( + name="maxChunkSizeInBytes", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of bytes for each blob written to storage. Value should be between + 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB).""" + encoding: Optional[Union[str, "_models.RoutingStorageContainerPropertiesEncoding"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Encoding that is used to serialize messages to blobs. Supported values are 'avro', + 'avrodeflate', and 'JSON'. Default value is 'avro'. Known values are: \"Avro\", + \"AvroDeflate\", and \"JSON\".""" + + @overload + def __init__( + self, + *, + name: str, + container_name: str, + id: Optional[str] = None, # pylint: disable=redefined-builtin + connection_string: Optional[str] = None, + endpoint_uri: Optional[str] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + file_name_format: Optional[str] = None, + batch_frequency_in_seconds: Optional[int] = None, + max_chunk_size_in_bytes: Optional[int] = None, + encoding: Optional[Union[str, "_models.RoutingStorageContainerPropertiesEncoding"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingTwin(_Model): + """Twin reference input parameter. This is an optional parameter. + + :ivar tags: Twin Tags. + :vartype tags: any + :ivar properties: + :vartype properties: ~azure.mgmt.iothub.models.RoutingTwinProperties + """ + + tags: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Twin Tags.""" + properties: Optional["_models.RoutingTwinProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + tags: Optional[Any] = None, + properties: Optional["_models.RoutingTwinProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RoutingTwinProperties(_Model): + """RoutingTwinProperties. + + :ivar desired: Twin desired properties. + :vartype desired: any + :ivar reported: Twin desired properties. + :vartype reported: any + """ + + desired: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Twin desired properties.""" + reported: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Twin desired properties.""" + + @overload + def __init__( + self, + *, + desired: Optional[Any] = None, + reported: Optional[Any] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SharedAccessSignatureAuthorizationRule(_Model): + """The properties of an IoT hub shared access policy. + + :ivar key_name: The name of the shared access policy. Required. + :vartype key_name: str + :ivar primary_key: The primary key. + :vartype primary_key: str + :ivar secondary_key: The secondary key. + :vartype secondary_key: str + :ivar rights: The permissions assigned to the shared access policy. Required. Known values are: + "RegistryRead", "RegistryWrite", "ServiceConnect", "DeviceConnect", "RegistryRead, + RegistryWrite", "RegistryRead, ServiceConnect", "RegistryRead, DeviceConnect", "RegistryWrite, + ServiceConnect", "RegistryWrite, DeviceConnect", "ServiceConnect, DeviceConnect", + "RegistryRead, RegistryWrite, ServiceConnect", "RegistryRead, RegistryWrite, DeviceConnect", + "RegistryRead, ServiceConnect, DeviceConnect", "RegistryWrite, ServiceConnect, DeviceConnect", + and "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect". + :vartype rights: str or ~azure.mgmt.iothub.models.AccessRights + """ + + key_name: str = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the shared access policy. Required.""" + primary_key: Optional[str] = rest_field( + name="primaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """The primary key.""" + secondary_key: Optional[str] = rest_field( + name="secondaryKey", visibility=["read", "create", "update", "delete", "query"] + ) + """The secondary key.""" + rights: Union[str, "_models.AccessRights"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The permissions assigned to the shared access policy. Required. Known values are: + \"RegistryRead\", \"RegistryWrite\", \"ServiceConnect\", \"DeviceConnect\", \"RegistryRead, + RegistryWrite\", \"RegistryRead, ServiceConnect\", \"RegistryRead, DeviceConnect\", + \"RegistryWrite, ServiceConnect\", \"RegistryWrite, DeviceConnect\", \"ServiceConnect, + DeviceConnect\", \"RegistryRead, RegistryWrite, ServiceConnect\", \"RegistryRead, + RegistryWrite, DeviceConnect\", \"RegistryRead, ServiceConnect, DeviceConnect\", + \"RegistryWrite, ServiceConnect, DeviceConnect\", and \"RegistryRead, RegistryWrite, + ServiceConnect, DeviceConnect\".""" + + @overload + def __init__( + self, + *, + key_name: str, + rights: Union[str, "_models.AccessRights"], + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StorageEndpointProperties(_Model): + """The properties of the Azure Storage endpoint for file upload. + + :ivar sas_ttl_as_iso8601: The period of time for which the SAS URI generated by IoT Hub for + file upload is valid. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options + `_. + :vartype sas_ttl_as_iso8601: ~datetime.timedelta + :ivar connection_string: The connection string for the Azure Storage account to which files are + uploaded. Required. + :vartype connection_string: str + :ivar container_name: The name of the root container where you upload files. The container need + not exist but should be creatable using the connectionString specified. Required. + :vartype container_name: str + :ivar authentication_type: Specifies authentication type being used for connecting to the + storage account. Known values are: "keyBased" and "identityBased". + :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType + :ivar identity: Managed identity properties of storage endpoint for file upload. + :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity + """ + + sas_ttl_as_iso8601: Optional[datetime.timedelta] = rest_field( + name="sasTtlAsIso8601", visibility=["read", "create", "update", "delete", "query"] + ) + """The period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options + `_.""" + connection_string: str = rest_field( + name="connectionString", visibility=["read", "create", "update", "delete", "query"] + ) + """The connection string for the Azure Storage account to which files are uploaded. Required.""" + container_name: str = rest_field(name="containerName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the root container where you upload files. The container need not exist but should + be creatable using the connectionString specified. Required.""" + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = rest_field( + name="authenticationType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies authentication type being used for connecting to the storage account. Known values + are: \"keyBased\" and \"identityBased\".""" + identity: Optional["_models.ManagedIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Managed identity properties of storage endpoint for file upload.""" + + @overload + def __init__( + self, + *, + connection_string: str, + container_name: str, + sas_ttl_as_iso8601: Optional[datetime.timedelta] = None, + authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, + identity: Optional["_models.ManagedIdentity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.iothub.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.iothub.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TagsResource(_Model): + """A container holding only the Tags for a resource, allowing the user to update the tags on an + IoT Hub instance. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TestAllRoutesInput(_Model): + """Input for testing all routes. + + :ivar routing_source: Routing source. Known values are: "Invalid", "DeviceMessages", + "TwinChangeEvents", "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", + "DigitalTwinChangeEvents", "DeviceConnectionStateEvents", and "MqttBrokerMessages". + :vartype routing_source: str or ~azure.mgmt.iothub.models.RoutingSource + :ivar message: Routing message. + :vartype message: ~azure.mgmt.iothub.models.RoutingMessage + :ivar twin: Routing Twin Reference. + :vartype twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + routing_source: Optional[Union[str, "_models.RoutingSource"]] = rest_field( + name="routingSource", visibility=["read", "create", "update", "delete", "query"] + ) + """Routing source. Known values are: \"Invalid\", \"DeviceMessages\", \"TwinChangeEvents\", + \"DeviceLifecycleEvents\", \"DeviceJobLifecycleEvents\", \"DigitalTwinChangeEvents\", + \"DeviceConnectionStateEvents\", and \"MqttBrokerMessages\".""" + message: Optional["_models.RoutingMessage"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Routing message.""" + twin: Optional["_models.RoutingTwin"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Routing Twin Reference.""" + + @overload + def __init__( + self, + *, + routing_source: Optional[Union[str, "_models.RoutingSource"]] = None, + message: Optional["_models.RoutingMessage"] = None, + twin: Optional["_models.RoutingTwin"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TestAllRoutesResult(_Model): + """Result of testing all routes. + + :ivar routes: JSON-serialized array of matched routes. + :vartype routes: list[~azure.mgmt.iothub.models.MatchedRoute] + """ + + routes: Optional[list["_models.MatchedRoute"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """JSON-serialized array of matched routes.""" + + @overload + def __init__( + self, + *, + routes: Optional[list["_models.MatchedRoute"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TestRouteInput(_Model): + """Input for testing route. + + :ivar message: Routing message. + :vartype message: ~azure.mgmt.iothub.models.RoutingMessage + :ivar route: Route properties. Required. + :vartype route: ~azure.mgmt.iothub.models.RouteProperties + :ivar twin: Routing Twin Reference. + :vartype twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + message: Optional["_models.RoutingMessage"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Routing message.""" + route: "_models.RouteProperties" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Route properties. Required.""" + twin: Optional["_models.RoutingTwin"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Routing Twin Reference.""" + + @overload + def __init__( + self, + *, + route: "_models.RouteProperties", + message: Optional["_models.RoutingMessage"] = None, + twin: Optional["_models.RoutingTwin"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TestRouteResult(_Model): + """Result of testing one route. + + :ivar result: Result of testing route. Known values are: "undefined", "false", and "true". + :vartype result: str or ~azure.mgmt.iothub.models.TestResultStatus + :ivar details: Detailed result of testing route. + :vartype details: ~azure.mgmt.iothub.models.TestRouteResultDetails + """ + + result: Optional[Union[str, "_models.TestResultStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Result of testing route. Known values are: \"undefined\", \"false\", and \"true\".""" + details: Optional["_models.TestRouteResultDetails"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Detailed result of testing route.""" + + @overload + def __init__( + self, + *, + result: Optional[Union[str, "_models.TestResultStatus"]] = None, + details: Optional["_models.TestRouteResultDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TestRouteResultDetails(_Model): + """Detailed result of testing a route. + + :ivar compilation_errors: JSON-serialized list of route compilation errors. + :vartype compilation_errors: list[~azure.mgmt.iothub.models.RouteCompilationError] + """ + + compilation_errors: Optional[list["_models.RouteCompilationError"]] = rest_field( + name="compilationErrors", visibility=["read", "create", "update", "delete", "query"] + ) + """JSON-serialized list of route compilation errors.""" + + @overload + def __init__( + self, + *, + compilation_errors: Optional[list["_models.RouteCompilationError"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserSubscriptionQuota(_Model): + """User subscription quota response. + + :ivar id: IotHub type id. + :vartype id: str + :ivar type: Response type. + :vartype type: str + :ivar unit: Unit of IotHub type. + :vartype unit: str + :ivar current_value: Current number of IotHub type. + :vartype current_value: int + :ivar limit: Numerical limit on IotHub type. + :vartype limit: int + :ivar name: IotHub type. + :vartype name: ~azure.mgmt.iothub.models.Name + """ + + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IotHub type id.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Response type.""" + unit: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Unit of IotHub type.""" + current_value: Optional[int] = rest_field( + name="currentValue", visibility=["read", "create", "update", "delete", "query"] + ) + """Current number of IotHub type.""" + limit: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Numerical limit on IotHub type.""" + name: Optional["_models.Name"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IotHub type.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + type: Optional[str] = None, + unit: Optional[str] = None, + current_value: Optional[int] = None, + limit: Optional[int] = None, + name: Optional["_models.Name"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class UserSubscriptionQuotaListResult(_Model): + """Json-serialized array of User subscription quota response. + + :ivar value: The UserSubscriptionQuota items on this page. + :vartype value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] + :ivar next_link: The link to the next page of items. + :vartype next_link: str + """ + + value: Optional[list["_models.UserSubscriptionQuota"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The UserSubscriptionQuota items on this page.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read"]) + """The link to the next page of items.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.UserSubscriptionQuota"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py deleted file mode 100644 index 5bb6e7e93018..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py +++ /dev/null @@ -1,4264 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from collections.abc import MutableMapping -import datetime -from typing import Any, Optional, TYPE_CHECKING, Union - -from .._utils import serialization as _serialization - -if TYPE_CHECKING: - from .. import models as _models -JSON = MutableMapping[str, Any] - - -class ArmIdentity(_serialization.Model): - """ArmIdentity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: Principal Id. - :vartype principal_id: str - :ivar tenant_id: Tenant Id. - :vartype tenant_id: str - :ivar type: The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' - includes both an implicitly created identity and a set of user assigned identities. The type - 'None' will remove any identities from the service. Known values are: "SystemAssigned", - "UserAssigned", "SystemAssigned, UserAssigned", and "None". - :vartype type: str or ~azure.mgmt.iothub.models.ResourceIdentityType - :ivar user_assigned_identities: Dictionary of :code:``. - :vartype user_assigned_identities: dict[str, ~azure.mgmt.iothub.models.ArmUserIdentity] - """ - - _validation = { - "principal_id": {"readonly": True}, - "tenant_id": {"readonly": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{ArmUserIdentity}"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, - user_assigned_identities: Optional[dict[str, "_models.ArmUserIdentity"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of identity used for the resource. The type - 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user - assigned identities. The type 'None' will remove any identities from the service. Known values - are: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None". - :paramtype type: str or ~azure.mgmt.iothub.models.ResourceIdentityType - :keyword user_assigned_identities: Dictionary of :code:``. - :paramtype user_assigned_identities: dict[str, ~azure.mgmt.iothub.models.ArmUserIdentity] - """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.tenant_id: Optional[str] = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ArmUserIdentity(_serialization.Model): - """ArmUserIdentity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: - :vartype principal_id: str - :ivar client_id: - :vartype client_id: str - """ - - _validation = { - "principal_id": {"readonly": True}, - "client_id": {"readonly": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.client_id: Optional[str] = None - - -class CertificateBodyDescription(_serialization.Model): - """The JSON-serialized X509 Certificate. - - :ivar certificate: base-64 representation of the X509 leaf certificate .cer file or just .pem - file content. - :vartype certificate: str - :ivar is_verified: True indicates that the certificate will be created in verified state and - proof of possession will not be required. - :vartype is_verified: bool - """ - - _attribute_map = { - "certificate": {"key": "certificate", "type": "str"}, - "is_verified": {"key": "isVerified", "type": "bool"}, - } - - def __init__(self, *, certificate: Optional[str] = None, is_verified: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword certificate: base-64 representation of the X509 leaf certificate .cer file or just - .pem file content. - :paramtype certificate: str - :keyword is_verified: True indicates that the certificate will be created in verified state and - proof of possession will not be required. - :paramtype is_verified: bool - """ - super().__init__(**kwargs) - self.certificate = certificate - self.is_verified = is_verified - - -class CertificateDescription(_serialization.Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar properties: The description of an X509 CA Certificate. - :vartype properties: ~azure.mgmt.iothub.models.CertificateProperties - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "etag": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "properties": {"key": "properties", "type": "CertificateProperties"}, - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, properties: Optional["_models.CertificateProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The description of an X509 CA Certificate. - :paramtype properties: ~azure.mgmt.iothub.models.CertificateProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.id: Optional[str] = None - self.name: Optional[str] = None - self.etag: Optional[str] = None - self.type: Optional[str] = None - - -class CertificateListDescription(_serialization.Model): - """The JSON-serialized array of Certificate objects. - - :ivar value: The array of Certificate objects. - :vartype value: list[~azure.mgmt.iothub.models.CertificateDescription] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[CertificateDescription]"}, - } - - def __init__(self, *, value: Optional[list["_models.CertificateDescription"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The array of Certificate objects. - :paramtype value: list[~azure.mgmt.iothub.models.CertificateDescription] - """ - super().__init__(**kwargs) - self.value = value - - -class CertificateProperties(_serialization.Model): - """The description of an X509 CA Certificate. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: ~datetime.datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: ~datetime.datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: ~datetime.datetime - :ivar certificate: The certificate content. - :vartype certificate: str - :ivar policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). - :vartype policy_resource_id: str - """ - - _validation = { - "subject": {"readonly": True}, - "expiry": {"readonly": True}, - "thumbprint": {"readonly": True}, - "created": {"readonly": True}, - "updated": {"readonly": True}, - } - - _attribute_map = { - "subject": {"key": "subject", "type": "str"}, - "expiry": {"key": "expiry", "type": "rfc-1123"}, - "thumbprint": {"key": "thumbprint", "type": "str"}, - "is_verified": {"key": "isVerified", "type": "bool"}, - "created": {"key": "created", "type": "rfc-1123"}, - "updated": {"key": "updated", "type": "rfc-1123"}, - "certificate": {"key": "certificate", "type": "str"}, - "policy_resource_id": {"key": "policyResourceId", "type": "str"}, - } - - def __init__( - self, - *, - is_verified: Optional[bool] = None, - certificate: Optional[str] = None, - policy_resource_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword is_verified: Determines whether certificate has been verified. - :paramtype is_verified: bool - :keyword certificate: The certificate content. - :paramtype certificate: str - :keyword policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). - :paramtype policy_resource_id: str - """ - super().__init__(**kwargs) - self.subject: Optional[str] = None - self.expiry: Optional[datetime.datetime] = None - self.thumbprint: Optional[str] = None - self.is_verified = is_verified - self.created: Optional[datetime.datetime] = None - self.updated: Optional[datetime.datetime] = None - self.certificate = certificate - self.policy_resource_id = policy_resource_id - - -class CertificatePropertiesWithNonce(_serialization.Model): - """The description of an X509 CA Certificate including the challenge nonce issued for the - Proof-Of-Possession flow. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: ~datetime.datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: ~datetime.datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: ~datetime.datetime - :ivar verification_code: The certificate's verification code that will be used for proof of - possession. - :vartype verification_code: str - :ivar certificate: The certificate content. - :vartype certificate: str - :ivar policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). - :vartype policy_resource_id: str - """ - - _validation = { - "subject": {"readonly": True}, - "expiry": {"readonly": True}, - "thumbprint": {"readonly": True}, - "is_verified": {"readonly": True}, - "created": {"readonly": True}, - "updated": {"readonly": True}, - "verification_code": {"readonly": True}, - "certificate": {"readonly": True}, - } - - _attribute_map = { - "subject": {"key": "subject", "type": "str"}, - "expiry": {"key": "expiry", "type": "rfc-1123"}, - "thumbprint": {"key": "thumbprint", "type": "str"}, - "is_verified": {"key": "isVerified", "type": "bool"}, - "created": {"key": "created", "type": "rfc-1123"}, - "updated": {"key": "updated", "type": "rfc-1123"}, - "verification_code": {"key": "verificationCode", "type": "str"}, - "certificate": {"key": "certificate", "type": "str"}, - "policy_resource_id": {"key": "policyResourceId", "type": "str"}, - } - - def __init__(self, *, policy_resource_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). - :paramtype policy_resource_id: str - """ - super().__init__(**kwargs) - self.subject: Optional[str] = None - self.expiry: Optional[datetime.datetime] = None - self.thumbprint: Optional[str] = None - self.is_verified: Optional[bool] = None - self.created: Optional[datetime.datetime] = None - self.updated: Optional[datetime.datetime] = None - self.verification_code: Optional[str] = None - self.certificate: Optional[str] = None - self.policy_resource_id = policy_resource_id - - -class CertificateVerificationDescription(_serialization.Model): - """The JSON-serialized leaf certificate. - - :ivar certificate: base-64 representation of X509 certificate .cer file or just .pem file - content. - :vartype certificate: str - """ - - _attribute_map = { - "certificate": {"key": "certificate", "type": "str"}, - } - - def __init__(self, *, certificate: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword certificate: base-64 representation of X509 certificate .cer file or just .pem file - content. - :paramtype certificate: str - """ - super().__init__(**kwargs) - self.certificate = certificate - - -class CertificateWithNonceDescription(_serialization.Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar properties: The description of an X509 CA Certificate including the challenge nonce - issued for the Proof-Of-Possession flow. - :vartype properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "etag": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "properties": {"key": "properties", "type": "CertificatePropertiesWithNonce"}, - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, properties: Optional["_models.CertificatePropertiesWithNonce"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The description of an X509 CA Certificate including the challenge nonce - issued for the Proof-Of-Possession flow. - :paramtype properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce - """ - super().__init__(**kwargs) - self.properties = properties - self.id: Optional[str] = None - self.name: Optional[str] = None - self.etag: Optional[str] = None - self.type: Optional[str] = None - - -class CloudToDeviceProperties(_serialization.Model): - """The IoT hub cloud-to-device messaging properties. - - :ivar max_delivery_count: The max delivery count for cloud-to-device messages in the device - queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :vartype max_delivery_count: int - :ivar default_ttl_as_iso8601: The default time to live for cloud-to-device messages in the - device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :vartype default_ttl_as_iso8601: ~datetime.timedelta - :ivar feedback: The properties of the feedback queue for cloud-to-device messages. - :vartype feedback: ~azure.mgmt.iothub.models.FeedbackProperties - """ - - _validation = { - "max_delivery_count": {"maximum": 100, "minimum": 1}, - } - - _attribute_map = { - "max_delivery_count": {"key": "maxDeliveryCount", "type": "int"}, - "default_ttl_as_iso8601": {"key": "defaultTtlAsIso8601", "type": "duration"}, - "feedback": {"key": "feedback", "type": "FeedbackProperties"}, - } - - def __init__( - self, - *, - max_delivery_count: Optional[int] = None, - default_ttl_as_iso8601: Optional[datetime.timedelta] = None, - feedback: Optional["_models.FeedbackProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword max_delivery_count: The max delivery count for cloud-to-device messages in the device - queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :paramtype max_delivery_count: int - :keyword default_ttl_as_iso8601: The default time to live for cloud-to-device messages in the - device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :paramtype default_ttl_as_iso8601: ~datetime.timedelta - :keyword feedback: The properties of the feedback queue for cloud-to-device messages. - :paramtype feedback: ~azure.mgmt.iothub.models.FeedbackProperties - """ - super().__init__(**kwargs) - self.max_delivery_count = max_delivery_count - self.default_ttl_as_iso8601 = default_ttl_as_iso8601 - self.feedback = feedback - - -class DeviceRegistry(_serialization.Model): - """Represents properties related to the Azure Device Registry (ADR). - - :ivar namespace_resource_id: The identifier of the Azure Device Registry namespace associated - with the GEN2 SKU hub. - :vartype namespace_resource_id: str - :ivar identity_resource_id: The identity used to manage the ADR namespace from the data plane. - :vartype identity_resource_id: str - """ - - _attribute_map = { - "namespace_resource_id": {"key": "namespaceResourceId", "type": "str"}, - "identity_resource_id": {"key": "identityResourceId", "type": "str"}, - } - - def __init__( - self, *, namespace_resource_id: Optional[str] = None, identity_resource_id: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword namespace_resource_id: The identifier of the Azure Device Registry namespace - associated with the GEN2 SKU hub. - :paramtype namespace_resource_id: str - :keyword identity_resource_id: The identity used to manage the ADR namespace from the data - plane. - :paramtype identity_resource_id: str - """ - super().__init__(**kwargs) - self.namespace_resource_id = namespace_resource_id - self.identity_resource_id = identity_resource_id - - -class EncryptionPropertiesDescription(_serialization.Model): - """The encryption properties for the IoT hub. - - :ivar key_source: The source of the key. - :vartype key_source: str - :ivar key_vault_properties: The properties of the KeyVault key. - :vartype key_vault_properties: list[~azure.mgmt.iothub.models.KeyVaultKeyProperties] - """ - - _attribute_map = { - "key_source": {"key": "keySource", "type": "str"}, - "key_vault_properties": {"key": "keyVaultProperties", "type": "[KeyVaultKeyProperties]"}, - } - - def __init__( - self, - *, - key_source: Optional[str] = None, - key_vault_properties: Optional[list["_models.KeyVaultKeyProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword key_source: The source of the key. - :paramtype key_source: str - :keyword key_vault_properties: The properties of the KeyVault key. - :paramtype key_vault_properties: list[~azure.mgmt.iothub.models.KeyVaultKeyProperties] - """ - super().__init__(**kwargs) - self.key_source = key_source - self.key_vault_properties = key_vault_properties - - -class EndpointHealthData(_serialization.Model): - """The health data for an endpoint. - - :ivar endpoint_id: Id of the endpoint. - :vartype endpoint_id: str - :ivar health_status: Health statuses have following meanings. The 'healthy' status shows that - the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint - is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. - The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an - eventually consistent state of health. The 'dead' status shows that the endpoint is not - accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub - metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that - the IoT Hub has not established a connection with the endpoint. No messages have been delivered - to or rejected from this endpoint. Known values are: "unknown", "healthy", "degraded", - "unhealthy", and "dead". - :vartype health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus - :ivar last_known_error: Last error obtained when a message failed to be delivered to iot hub. - :vartype last_known_error: str - :ivar last_known_error_time: Time at which the last known error occurred. - :vartype last_known_error_time: ~datetime.datetime - :ivar last_successful_send_attempt_time: Last time iot hub successfully sent a message to the - endpoint. - :vartype last_successful_send_attempt_time: ~datetime.datetime - :ivar last_send_attempt_time: Last time iot hub tried to send a message to the endpoint. - :vartype last_send_attempt_time: ~datetime.datetime - """ - - _attribute_map = { - "endpoint_id": {"key": "endpointId", "type": "str"}, - "health_status": {"key": "healthStatus", "type": "str"}, - "last_known_error": {"key": "lastKnownError", "type": "str"}, - "last_known_error_time": {"key": "lastKnownErrorTime", "type": "rfc-1123"}, - "last_successful_send_attempt_time": {"key": "lastSuccessfulSendAttemptTime", "type": "rfc-1123"}, - "last_send_attempt_time": {"key": "lastSendAttemptTime", "type": "rfc-1123"}, - } - - def __init__( - self, - *, - endpoint_id: Optional[str] = None, - health_status: Optional[Union[str, "_models.EndpointHealthStatus"]] = None, - last_known_error: Optional[str] = None, - last_known_error_time: Optional[datetime.datetime] = None, - last_successful_send_attempt_time: Optional[datetime.datetime] = None, - last_send_attempt_time: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword endpoint_id: Id of the endpoint. - :paramtype endpoint_id: str - :keyword health_status: Health statuses have following meanings. The 'healthy' status shows - that the endpoint is accepting messages as expected. The 'unhealthy' status shows that the - endpoint is not accepting messages as expected and IoT Hub is retrying to send data to this - endpoint. The status of an unhealthy endpoint will be updated to healthy when IoT Hub has - established an eventually consistent state of health. The 'dead' status shows that the endpoint - is not accepting messages, after IoT Hub retried sending messages for the retrial period. See - IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status - shows that the IoT Hub has not established a connection with the endpoint. No messages have - been delivered to or rejected from this endpoint. Known values are: "unknown", "healthy", - "degraded", "unhealthy", and "dead". - :paramtype health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus - :keyword last_known_error: Last error obtained when a message failed to be delivered to iot - hub. - :paramtype last_known_error: str - :keyword last_known_error_time: Time at which the last known error occurred. - :paramtype last_known_error_time: ~datetime.datetime - :keyword last_successful_send_attempt_time: Last time iot hub successfully sent a message to - the endpoint. - :paramtype last_successful_send_attempt_time: ~datetime.datetime - :keyword last_send_attempt_time: Last time iot hub tried to send a message to the endpoint. - :paramtype last_send_attempt_time: ~datetime.datetime - """ - super().__init__(**kwargs) - self.endpoint_id = endpoint_id - self.health_status = health_status - self.last_known_error = last_known_error - self.last_known_error_time = last_known_error_time - self.last_successful_send_attempt_time = last_successful_send_attempt_time - self.last_send_attempt_time = last_send_attempt_time - - -class EndpointHealthDataListResult(_serialization.Model): - """The JSON-serialized array of EndpointHealthData objects with a next link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: JSON-serialized array of Endpoint health data. - :vartype value: list[~azure.mgmt.iothub.models.EndpointHealthData] - :ivar next_link: Link to more results. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[EndpointHealthData]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.EndpointHealthData"]] = None, **kwargs: Any) -> None: - """ - :keyword value: JSON-serialized array of Endpoint health data. - :paramtype value: list[~azure.mgmt.iothub.models.EndpointHealthData] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class EnrichmentProperties(_serialization.Model): - """The properties of an enrichment that your IoT hub applies to messages delivered to endpoints. - - All required parameters must be populated in order to send to server. - - :ivar key: The key or name for the enrichment property. Required. - :vartype key: str - :ivar value: The value for the enrichment property. Required. - :vartype value: str - :ivar endpoint_names: The list of endpoints for which the enrichment is applied to the message. - Required. - :vartype endpoint_names: list[str] - """ - - _validation = { - "key": {"required": True}, - "value": {"required": True}, - "endpoint_names": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "key": {"key": "key", "type": "str"}, - "value": {"key": "value", "type": "str"}, - "endpoint_names": {"key": "endpointNames", "type": "[str]"}, - } - - def __init__(self, *, key: str, value: str, endpoint_names: list[str], **kwargs: Any) -> None: - """ - :keyword key: The key or name for the enrichment property. Required. - :paramtype key: str - :keyword value: The value for the enrichment property. Required. - :paramtype value: str - :keyword endpoint_names: The list of endpoints for which the enrichment is applied to the - message. Required. - :paramtype endpoint_names: list[str] - """ - super().__init__(**kwargs) - self.key = key - self.value = value - self.endpoint_names = endpoint_names - - -class ErrorDetails(_serialization.Model): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar http_status_code: The HTTP status code. - :vartype http_status_code: str - :ivar message: The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: str - """ - - _validation = { - "code": {"readonly": True}, - "http_status_code": {"readonly": True}, - "message": {"readonly": True}, - "details": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "http_status_code": {"key": "httpStatusCode", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "details": {"key": "details", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.http_status_code: Optional[str] = None - self.message: Optional[str] = None - self.details: Optional[str] = None - - -class EventHubConsumerGroupBodyDescription(_serialization.Model): - """The EventHub consumer group. - - All required parameters must be populated in order to send to server. - - :ivar properties: The EventHub consumer group name. Required. - :vartype properties: ~azure.mgmt.iothub.models.EventHubConsumerGroupName - """ - - _validation = { - "properties": {"required": True}, - } - - _attribute_map = { - "properties": {"key": "properties", "type": "EventHubConsumerGroupName"}, - } - - def __init__(self, *, properties: "_models.EventHubConsumerGroupName", **kwargs: Any) -> None: - """ - :keyword properties: The EventHub consumer group name. Required. - :paramtype properties: ~azure.mgmt.iothub.models.EventHubConsumerGroupName - """ - super().__init__(**kwargs) - self.properties = properties - - -class EventHubConsumerGroupInfo(_serialization.Model): - """The properties of the EventHubConsumerGroupInfo object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar properties: The tags. - :vartype properties: dict[str, any] - :ivar id: The Event Hub-compatible consumer group identifier. - :vartype id: str - :ivar name: The Event Hub-compatible consumer group name. - :vartype name: str - :ivar type: the resource type. - :vartype type: str - :ivar etag: The etag. - :vartype etag: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "etag": {"readonly": True}, - } - - _attribute_map = { - "properties": {"key": "properties", "type": "{object}"}, - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "etag": {"key": "etag", "type": "str"}, - } - - def __init__(self, *, properties: Optional[dict[str, Any]] = None, **kwargs: Any) -> None: - """ - :keyword properties: The tags. - :paramtype properties: dict[str, any] - """ - super().__init__(**kwargs) - self.properties = properties - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.etag: Optional[str] = None - - -class EventHubConsumerGroupName(_serialization.Model): - """The EventHub consumer group name. - - All required parameters must be populated in order to send to server. - - :ivar name: EventHub consumer group name. Required. - :vartype name: str - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: EventHub consumer group name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class EventHubConsumerGroupsListResult(_serialization.Model): - """The JSON-serialized array of Event Hub-compatible consumer group names with a next link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of consumer groups objects. - :vartype value: list[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] - :ivar next_link: The next link. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[EventHubConsumerGroupInfo]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.EventHubConsumerGroupInfo"]] = None, **kwargs: Any) -> None: - """ - :keyword value: List of consumer groups objects. - :paramtype value: list[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class EventHubProperties(_serialization.Model): - """The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar retention_time_in_days: The retention time for device-to-cloud messages in days. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :vartype retention_time_in_days: int - :ivar partition_count: The number of partitions for receiving device-to-cloud messages in the - Event Hub-compatible endpoint. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :vartype partition_count: int - :ivar partition_ids: The partition ids in the Event Hub-compatible endpoint. - :vartype partition_ids: list[str] - :ivar path: The Event Hub-compatible name. - :vartype path: str - :ivar endpoint: The Event Hub-compatible endpoint. - :vartype endpoint: str - """ - - _validation = { - "partition_ids": {"readonly": True}, - "path": {"readonly": True}, - "endpoint": {"readonly": True}, - } - - _attribute_map = { - "retention_time_in_days": {"key": "retentionTimeInDays", "type": "int"}, - "partition_count": {"key": "partitionCount", "type": "int"}, - "partition_ids": {"key": "partitionIds", "type": "[str]"}, - "path": {"key": "path", "type": "str"}, - "endpoint": {"key": "endpoint", "type": "str"}, - } - - def __init__( - self, *, retention_time_in_days: Optional[int] = None, partition_count: Optional[int] = None, **kwargs: Any - ) -> None: - """ - :keyword retention_time_in_days: The retention time for device-to-cloud messages in days. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :paramtype retention_time_in_days: int - :keyword partition_count: The number of partitions for receiving device-to-cloud messages in - the Event Hub-compatible endpoint. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :paramtype partition_count: int - """ - super().__init__(**kwargs) - self.retention_time_in_days = retention_time_in_days - self.partition_count = partition_count - self.partition_ids: Optional[list[str]] = None - self.path: Optional[str] = None - self.endpoint: Optional[str] = None - - -class ExportDevicesRequest(_serialization.Model): - """Use to provide parameters when requesting an export of all devices in the IoT hub. - - All required parameters must be populated in order to send to server. - - :ivar export_blob_container_uri: The export blob container URI. Required. - :vartype export_blob_container_uri: str - :ivar exclude_keys: The value indicating whether keys should be excluded during export. - Required. - :vartype exclude_keys: bool - :ivar export_blob_name: The name of the blob that will be created in the provided output blob - container. This blob will contain the exported device registry information for the IoT Hub. - :vartype export_blob_name: str - :ivar authentication_type: Specifies authentication type being used for connecting to the - storage account. Known values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of storage endpoint for export devices. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :ivar include_configurations: The value indicating whether configurations should be exported. - :vartype include_configurations: bool - :ivar configurations_blob_name: The name of the blob that will be created in the provided - output blob container. This blob will contain the exported configurations for the Iot Hub. - :vartype configurations_blob_name: str - """ - - _validation = { - "export_blob_container_uri": {"required": True}, - "exclude_keys": {"required": True}, - } - - _attribute_map = { - "export_blob_container_uri": {"key": "exportBlobContainerUri", "type": "str"}, - "exclude_keys": {"key": "excludeKeys", "type": "bool"}, - "export_blob_name": {"key": "exportBlobName", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - "include_configurations": {"key": "includeConfigurations", "type": "bool"}, - "configurations_blob_name": {"key": "configurationsBlobName", "type": "str"}, - } - - def __init__( - self, - *, - export_blob_container_uri: str, - exclude_keys: bool, - export_blob_name: Optional[str] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - include_configurations: Optional[bool] = None, - configurations_blob_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword export_blob_container_uri: The export blob container URI. Required. - :paramtype export_blob_container_uri: str - :keyword exclude_keys: The value indicating whether keys should be excluded during export. - Required. - :paramtype exclude_keys: bool - :keyword export_blob_name: The name of the blob that will be created in the provided output - blob container. This blob will contain the exported device registry information for the IoT - Hub. - :paramtype export_blob_name: str - :keyword authentication_type: Specifies authentication type being used for connecting to the - storage account. Known values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of storage endpoint for export devices. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :keyword include_configurations: The value indicating whether configurations should be - exported. - :paramtype include_configurations: bool - :keyword configurations_blob_name: The name of the blob that will be created in the provided - output blob container. This blob will contain the exported configurations for the Iot Hub. - :paramtype configurations_blob_name: str - """ - super().__init__(**kwargs) - self.export_blob_container_uri = export_blob_container_uri - self.exclude_keys = exclude_keys - self.export_blob_name = export_blob_name - self.authentication_type = authentication_type - self.identity = identity - self.include_configurations = include_configurations - self.configurations_blob_name = configurations_blob_name - - -class FailoverInput(_serialization.Model): - """Use to provide failover region when requesting manual Failover for a hub. - - All required parameters must be populated in order to send to server. - - :ivar failover_region: Region the hub will be failed over to. Required. - :vartype failover_region: str - """ - - _validation = { - "failover_region": {"required": True}, - } - - _attribute_map = { - "failover_region": {"key": "failoverRegion", "type": "str"}, - } - - def __init__(self, *, failover_region: str, **kwargs: Any) -> None: - """ - :keyword failover_region: Region the hub will be failed over to. Required. - :paramtype failover_region: str - """ - super().__init__(**kwargs) - self.failover_region = failover_region - - -class FallbackRouteProperties(_serialization.Model): - """The properties of the fallback route. IoT Hub uses these properties when it routes messages to - the fallback endpoint. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the route. The name can only include alphanumeric characters, periods, - underscores, hyphens, has a maximum length of 64 characters, and must be unique. - :vartype name: str - :ivar source: The source to which the routing rule is to be applied to. For example, - DeviceMessages. Required. Known values are: "Invalid", "DeviceMessages", "TwinChangeEvents", - "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", "DigitalTwinChangeEvents", - "DeviceConnectionStateEvents", and "MqttBrokerMessages". - :vartype source: str or ~azure.mgmt.iothub.models.RoutingSource - :ivar condition: The condition which is evaluated in order to apply the fallback route. If the - condition is not provided it will evaluate to true by default. For grammar, See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language. - :vartype condition: str - :ivar endpoint_names: The list of endpoints to which the messages that satisfy the condition - are routed to. Currently only 1 endpoint is allowed. Required. - :vartype endpoint_names: list[str] - :ivar is_enabled: Used to specify whether the fallback route is enabled. Required. - :vartype is_enabled: bool - """ - - _validation = { - "source": {"required": True}, - "endpoint_names": {"required": True, "max_items": 1, "min_items": 1}, - "is_enabled": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "source": {"key": "source", "type": "str"}, - "condition": {"key": "condition", "type": "str"}, - "endpoint_names": {"key": "endpointNames", "type": "[str]"}, - "is_enabled": {"key": "isEnabled", "type": "bool"}, - } - - def __init__( - self, - *, - source: Union[str, "_models.RoutingSource"], - endpoint_names: list[str], - is_enabled: bool, - name: Optional[str] = None, - condition: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The name of the route. The name can only include alphanumeric characters, - periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique. - :paramtype name: str - :keyword source: The source to which the routing rule is to be applied to. For example, - DeviceMessages. Required. Known values are: "Invalid", "DeviceMessages", "TwinChangeEvents", - "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", "DigitalTwinChangeEvents", - "DeviceConnectionStateEvents", and "MqttBrokerMessages". - :paramtype source: str or ~azure.mgmt.iothub.models.RoutingSource - :keyword condition: The condition which is evaluated in order to apply the fallback route. If - the condition is not provided it will evaluate to true by default. For grammar, See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language. - :paramtype condition: str - :keyword endpoint_names: The list of endpoints to which the messages that satisfy the condition - are routed to. Currently only 1 endpoint is allowed. Required. - :paramtype endpoint_names: list[str] - :keyword is_enabled: Used to specify whether the fallback route is enabled. Required. - :paramtype is_enabled: bool - """ - super().__init__(**kwargs) - self.name = name - self.source = source - self.condition = condition - self.endpoint_names = endpoint_names - self.is_enabled = is_enabled - - -class FeedbackProperties(_serialization.Model): - """The properties of the feedback queue for cloud-to-device messages. - - :ivar lock_duration_as_iso8601: The lock duration for the feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :vartype lock_duration_as_iso8601: ~datetime.timedelta - :ivar ttl_as_iso8601: The period of time for which a message is available to consume before it - is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :vartype ttl_as_iso8601: ~datetime.timedelta - :ivar max_delivery_count: The number of times the IoT hub attempts to deliver a message on the - feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :vartype max_delivery_count: int - """ - - _validation = { - "max_delivery_count": {"maximum": 100, "minimum": 1}, - } - - _attribute_map = { - "lock_duration_as_iso8601": {"key": "lockDurationAsIso8601", "type": "duration"}, - "ttl_as_iso8601": {"key": "ttlAsIso8601", "type": "duration"}, - "max_delivery_count": {"key": "maxDeliveryCount", "type": "int"}, - } - - def __init__( - self, - *, - lock_duration_as_iso8601: Optional[datetime.timedelta] = None, - ttl_as_iso8601: Optional[datetime.timedelta] = None, - max_delivery_count: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword lock_duration_as_iso8601: The lock duration for the feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :paramtype lock_duration_as_iso8601: ~datetime.timedelta - :keyword ttl_as_iso8601: The period of time for which a message is available to consume before - it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :paramtype ttl_as_iso8601: ~datetime.timedelta - :keyword max_delivery_count: The number of times the IoT hub attempts to deliver a message on - the feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :paramtype max_delivery_count: int - """ - super().__init__(**kwargs) - self.lock_duration_as_iso8601 = lock_duration_as_iso8601 - self.ttl_as_iso8601 = ttl_as_iso8601 - self.max_delivery_count = max_delivery_count - - -class GroupIdInformation(_serialization.Model): - """The group information for creating a private endpoint on an IotHub. - - 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 server. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar properties: The properties for a group information object. Required. - :vartype properties: ~azure.mgmt.iothub.models.GroupIdInformationProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "properties": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "properties": {"key": "properties", "type": "GroupIdInformationProperties"}, - } - - def __init__(self, *, properties: "_models.GroupIdInformationProperties", **kwargs: Any) -> None: - """ - :keyword properties: The properties for a group information object. Required. - :paramtype properties: ~azure.mgmt.iothub.models.GroupIdInformationProperties - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.properties = properties - - -class GroupIdInformationProperties(_serialization.Model): - """The properties for a group information object. - - :ivar group_id: The group id. - :vartype group_id: str - :ivar required_members: The required members for a specific group id. - :vartype required_members: list[str] - :ivar required_zone_names: The required DNS zones for a specific group id. - :vartype required_zone_names: list[str] - """ - - _attribute_map = { - "group_id": {"key": "groupId", "type": "str"}, - "required_members": {"key": "requiredMembers", "type": "[str]"}, - "required_zone_names": {"key": "requiredZoneNames", "type": "[str]"}, - } - - def __init__( - self, - *, - group_id: Optional[str] = None, - required_members: Optional[list[str]] = None, - required_zone_names: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword group_id: The group id. - :paramtype group_id: str - :keyword required_members: The required members for a specific group id. - :paramtype required_members: list[str] - :keyword required_zone_names: The required DNS zones for a specific group id. - :paramtype required_zone_names: list[str] - """ - super().__init__(**kwargs) - self.group_id = group_id - self.required_members = required_members - self.required_zone_names = required_zone_names - - -class ImportDevicesRequest(_serialization.Model): - """Use to provide parameters when requesting an import of all devices in the hub. - - All required parameters must be populated in order to send to server. - - :ivar input_blob_container_uri: The input blob container URI. Required. - :vartype input_blob_container_uri: str - :ivar output_blob_container_uri: The output blob container URI. Required. - :vartype output_blob_container_uri: str - :ivar input_blob_name: The blob name to be used when importing from the provided input blob - container. - :vartype input_blob_name: str - :ivar output_blob_name: The blob name to use for storing the status of the import job. - :vartype output_blob_name: str - :ivar authentication_type: Specifies authentication type being used for connecting to the - storage account. Known values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of storage endpoint for import devices. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :ivar include_configurations: The value indicating whether configurations should be imported. - :vartype include_configurations: bool - :ivar configurations_blob_name: The blob name to be used when importing configurations from the - provided input blob container. - :vartype configurations_blob_name: str - """ - - _validation = { - "input_blob_container_uri": {"required": True}, - "output_blob_container_uri": {"required": True}, - } - - _attribute_map = { - "input_blob_container_uri": {"key": "inputBlobContainerUri", "type": "str"}, - "output_blob_container_uri": {"key": "outputBlobContainerUri", "type": "str"}, - "input_blob_name": {"key": "inputBlobName", "type": "str"}, - "output_blob_name": {"key": "outputBlobName", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - "include_configurations": {"key": "includeConfigurations", "type": "bool"}, - "configurations_blob_name": {"key": "configurationsBlobName", "type": "str"}, - } - - def __init__( - self, - *, - input_blob_container_uri: str, - output_blob_container_uri: str, - input_blob_name: Optional[str] = None, - output_blob_name: Optional[str] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - include_configurations: Optional[bool] = None, - configurations_blob_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword input_blob_container_uri: The input blob container URI. Required. - :paramtype input_blob_container_uri: str - :keyword output_blob_container_uri: The output blob container URI. Required. - :paramtype output_blob_container_uri: str - :keyword input_blob_name: The blob name to be used when importing from the provided input blob - container. - :paramtype input_blob_name: str - :keyword output_blob_name: The blob name to use for storing the status of the import job. - :paramtype output_blob_name: str - :keyword authentication_type: Specifies authentication type being used for connecting to the - storage account. Known values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of storage endpoint for import devices. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :keyword include_configurations: The value indicating whether configurations should be - imported. - :paramtype include_configurations: bool - :keyword configurations_blob_name: The blob name to be used when importing configurations from - the provided input blob container. - :paramtype configurations_blob_name: str - """ - super().__init__(**kwargs) - self.input_blob_container_uri = input_blob_container_uri - self.output_blob_container_uri = output_blob_container_uri - self.input_blob_name = input_blob_name - self.output_blob_name = output_blob_name - self.authentication_type = authentication_type - self.identity = identity - self.include_configurations = include_configurations - self.configurations_blob_name = configurations_blob_name - - -class IotHubCapacity(_serialization.Model): - """IoT Hub capacity information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar minimum: The minimum number of units. - :vartype minimum: int - :ivar maximum: The maximum number of units. - :vartype maximum: int - :ivar default: The default number of units. - :vartype default: int - :ivar scale_type: The type of the scaling enabled. Known values are: "Automatic", "Manual", and - "None". - :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType - """ - - _validation = { - "minimum": {"readonly": True, "maximum": 1, "minimum": 1}, - "maximum": {"readonly": True}, - "default": {"readonly": True}, - "scale_type": {"readonly": True}, - } - - _attribute_map = { - "minimum": {"key": "minimum", "type": "int"}, - "maximum": {"key": "maximum", "type": "int"}, - "default": {"key": "default", "type": "int"}, - "scale_type": {"key": "scaleType", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.minimum: Optional[int] = None - self.maximum: Optional[int] = None - self.default: Optional[int] = None - self.scale_type: Optional[Union[str, "_models.IotHubScaleType"]] = None - - -class Resource(_serialization.Model): - """The common properties of an Azure 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 server. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar location: The resource location. Required. - :vartype location: str - :ivar tags: The resource tags. - :vartype tags: dict[str, str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True, "pattern": r"^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$"}, - "type": {"readonly": True}, - "location": {"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}"}, - } - - def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword location: The resource location. Required. - :paramtype location: str - :keyword tags: The resource tags. - :paramtype tags: dict[str, str] - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.location = location - self.tags = tags - - -class IotHubDescription(Resource): - """The description of the IoT hub. - - 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 server. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar location: The resource location. Required. - :vartype location: str - :ivar tags: The resource tags. - :vartype tags: dict[str, str] - :ivar etag: The Etag field is *not* required. If it is provided in the response body, it must - also be provided as a header per the normal ETag convention. - :vartype etag: str - :ivar properties: IotHub properties. - :vartype properties: ~azure.mgmt.iothub.models.IotHubProperties - :ivar sku: IotHub SKU info. Required. - :vartype sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :ivar identity: The managed identities for the IotHub. - :vartype identity: ~azure.mgmt.iothub.models.ArmIdentity - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: ~azure.mgmt.iothub.models.SystemData - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True, "pattern": r"^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$"}, - "type": {"readonly": True}, - "location": {"required": True}, - "sku": {"required": True}, - "system_data": {"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}"}, - "etag": {"key": "etag", "type": "str"}, - "properties": {"key": "properties", "type": "IotHubProperties"}, - "sku": {"key": "sku", "type": "IotHubSkuInfo"}, - "identity": {"key": "identity", "type": "ArmIdentity"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - def __init__( - self, - *, - location: str, - sku: "_models.IotHubSkuInfo", - tags: Optional[dict[str, str]] = None, - etag: Optional[str] = None, - properties: Optional["_models.IotHubProperties"] = None, - identity: Optional["_models.ArmIdentity"] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: The resource location. Required. - :paramtype location: str - :keyword tags: The resource tags. - :paramtype tags: dict[str, str] - :keyword etag: The Etag field is *not* required. If it is provided in the response body, it - must also be provided as a header per the normal ETag convention. - :paramtype etag: str - :keyword properties: IotHub properties. - :paramtype properties: ~azure.mgmt.iothub.models.IotHubProperties - :keyword sku: IotHub SKU info. Required. - :paramtype sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :keyword identity: The managed identities for the IotHub. - :paramtype identity: ~azure.mgmt.iothub.models.ArmIdentity - """ - super().__init__(location=location, tags=tags, **kwargs) - self.etag = etag - self.properties = properties - self.sku = sku - self.identity = identity - self.system_data: Optional["_models.SystemData"] = None - - -class IotHubDescriptionListResult(_serialization.Model): - """The JSON-serialized array of IotHubDescription objects with a next link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The array of IotHubDescription objects. - :vartype value: list[~azure.mgmt.iothub.models.IotHubDescription] - :ivar next_link: The next link. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[IotHubDescription]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.IotHubDescription"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The array of IotHubDescription objects. - :paramtype value: list[~azure.mgmt.iothub.models.IotHubDescription] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class IotHubLocationDescription(_serialization.Model): - """Public representation of one of the locations where a resource is provisioned. - - :ivar location: The name of the Azure region. - :vartype location: str - :ivar role: The role of the region, can be either primary or secondary. The primary region is - where the IoT hub is currently provisioned. The secondary region is the Azure disaster recovery - (DR) paired region and also the region where the IoT hub can failover to. Known values are: - "primary" and "secondary". - :vartype role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType - """ - - _attribute_map = { - "location": {"key": "location", "type": "str"}, - "role": {"key": "role", "type": "str"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - role: Optional[Union[str, "_models.IotHubReplicaRoleType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: The name of the Azure region. - :paramtype location: str - :keyword role: The role of the region, can be either primary or secondary. The primary region - is where the IoT hub is currently provisioned. The secondary region is the Azure disaster - recovery (DR) paired region and also the region where the IoT hub can failover to. Known values - are: "primary" and "secondary". - :paramtype role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType - """ - super().__init__(**kwargs) - self.location = location - self.role = role - - -class IotHubNameAvailabilityInfo(_serialization.Model): - """The properties indicating whether a given IoT hub name is available. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name_available: The value which indicates whether the provided name is available. - :vartype name_available: bool - :ivar reason: The reason for unavailability. Known values are: "Invalid" and "AlreadyExists". - :vartype reason: str or ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason - :ivar message: The detailed reason message. - :vartype message: str - """ - - _validation = { - "name_available": {"readonly": True}, - "reason": {"readonly": True}, - } - - _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, *, message: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword message: The detailed reason message. - :paramtype message: str - """ - super().__init__(**kwargs) - self.name_available: Optional[bool] = None - self.reason: Optional[Union[str, "_models.IotHubNameUnavailabilityReason"]] = None - self.message = message - - -class IotHubProperties(_serialization.Model): - """The properties of an IoT hub. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar authorization_policies: The shared access policies you can use to secure a connection to - the IoT hub. - :vartype authorization_policies: - list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :ivar disable_local_auth: If true, SAS tokens with Iot hub scoped SAS keys cannot be used for - authentication. - :vartype disable_local_auth: bool - :ivar disable_device_sas: If true, all device(including Edge devices but excluding modules) - scoped SAS keys cannot be used for authentication. - :vartype disable_device_sas: bool - :ivar disable_module_sas: If true, all module scoped SAS keys cannot be used for - authentication. - :vartype disable_module_sas: bool - :ivar restrict_outbound_network_access: If true, egress from IotHub will be restricted to only - the allowed FQDNs that are configured via allowedFqdnList. - :vartype restrict_outbound_network_access: bool - :ivar allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from Iot - Hub. - :vartype allowed_fqdn_list: list[str] - :ivar public_network_access: Whether requests from Public Network are allowed. Known values - are: "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.iothub.models.PublicNetworkAccess - :ivar ip_filter_rules: The IP filter rules. - :vartype ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] - :ivar network_rule_sets: Network Rule Set Properties of IotHub. - :vartype network_rule_sets: ~azure.mgmt.iothub.models.NetworkRuleSetProperties - :ivar min_tls_version: Specifies the minimum TLS version to support for this hub. Can be set to - "1.2" to have clients that use a TLS version below 1.2 to be rejected. - :vartype min_tls_version: str - :ivar private_endpoint_connections: Private endpoint connections created on this IotHub. - :vartype private_endpoint_connections: - list[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar state: The hub state. - :vartype state: str - :ivar host_name: The name of the host. - :vartype host_name: str - :ivar event_hub_endpoints: The Event Hub-compatible endpoint properties. The only possible keys - to this dictionary is events. This key has to be present in the dictionary while making create - or update calls for the IoT hub. - :vartype event_hub_endpoints: dict[str, ~azure.mgmt.iothub.models.EventHubProperties] - :ivar routing: The routing related properties of the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - :vartype routing: ~azure.mgmt.iothub.models.RoutingProperties - :ivar storage_endpoints: The list of Azure Storage endpoints where you can upload files. - Currently you can configure only one Azure Storage account and that MUST have its key as - $default. Specifying more than one storage account causes an error to be thrown. Not specifying - a value for this property when the enableFileUploadNotifications property is set to True, - causes an error to be thrown. - :vartype storage_endpoints: dict[str, ~azure.mgmt.iothub.models.StorageEndpointProperties] - :ivar messaging_endpoints: The messaging endpoint properties for the file upload notification - queue. - :vartype messaging_endpoints: dict[str, ~azure.mgmt.iothub.models.MessagingEndpointProperties] - :ivar enable_file_upload_notifications: If True, file upload notifications are enabled. - :vartype enable_file_upload_notifications: bool - :ivar cloud_to_device: The IoT hub cloud-to-device messaging properties. - :vartype cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties - :ivar comments: IoT hub comments. - :vartype comments: str - :ivar device_streams: The device streams properties of iothub. - :vartype device_streams: ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams - :ivar features: The capabilities and features enabled for the IoT hub. Known values are: "None" - and "DeviceManagement". - :vartype features: str or ~azure.mgmt.iothub.models.Capabilities - :ivar encryption: The encryption properties for the IoT hub. - :vartype encryption: ~azure.mgmt.iothub.models.EncryptionPropertiesDescription - :ivar locations: Primary and secondary location for iot hub. - :vartype locations: list[~azure.mgmt.iothub.models.IotHubLocationDescription] - :ivar enable_data_residency: This property when set to true, will enable data residency, thus, - disabling disaster recovery. - :vartype enable_data_residency: bool - :ivar root_certificate: This property store root certificate related information. - :vartype root_certificate: ~azure.mgmt.iothub.models.RootCertificateProperties - :ivar ip_version: This property specifies the IP Version the hub is currently utilizing. Known - values are: "ipv4", "ipv6", and "ipv4ipv6". - :vartype ip_version: str or ~azure.mgmt.iothub.models.IpVersion - :ivar device_registry: Represents properties related to the Azure Device Registry (ADR). - :vartype device_registry: ~azure.mgmt.iothub.models.DeviceRegistry - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "state": {"readonly": True}, - "host_name": {"readonly": True}, - "locations": {"readonly": True}, - } - - _attribute_map = { - "authorization_policies": {"key": "authorizationPolicies", "type": "[SharedAccessSignatureAuthorizationRule]"}, - "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, - "disable_device_sas": {"key": "disableDeviceSAS", "type": "bool"}, - "disable_module_sas": {"key": "disableModuleSAS", "type": "bool"}, - "restrict_outbound_network_access": {"key": "restrictOutboundNetworkAccess", "type": "bool"}, - "allowed_fqdn_list": {"key": "allowedFqdnList", "type": "[str]"}, - "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, - "ip_filter_rules": {"key": "ipFilterRules", "type": "[IpFilterRule]"}, - "network_rule_sets": {"key": "networkRuleSets", "type": "NetworkRuleSetProperties"}, - "min_tls_version": {"key": "minTlsVersion", "type": "str"}, - "private_endpoint_connections": {"key": "privateEndpointConnections", "type": "[PrivateEndpointConnection]"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "state": {"key": "state", "type": "str"}, - "host_name": {"key": "hostName", "type": "str"}, - "event_hub_endpoints": {"key": "eventHubEndpoints", "type": "{EventHubProperties}"}, - "routing": {"key": "routing", "type": "RoutingProperties"}, - "storage_endpoints": {"key": "storageEndpoints", "type": "{StorageEndpointProperties}"}, - "messaging_endpoints": {"key": "messagingEndpoints", "type": "{MessagingEndpointProperties}"}, - "enable_file_upload_notifications": {"key": "enableFileUploadNotifications", "type": "bool"}, - "cloud_to_device": {"key": "cloudToDevice", "type": "CloudToDeviceProperties"}, - "comments": {"key": "comments", "type": "str"}, - "device_streams": {"key": "deviceStreams", "type": "IotHubPropertiesDeviceStreams"}, - "features": {"key": "features", "type": "str"}, - "encryption": {"key": "encryption", "type": "EncryptionPropertiesDescription"}, - "locations": {"key": "locations", "type": "[IotHubLocationDescription]"}, - "enable_data_residency": {"key": "enableDataResidency", "type": "bool"}, - "root_certificate": {"key": "rootCertificate", "type": "RootCertificateProperties"}, - "ip_version": {"key": "ipVersion", "type": "str"}, - "device_registry": {"key": "deviceRegistry", "type": "DeviceRegistry"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - authorization_policies: Optional[list["_models.SharedAccessSignatureAuthorizationRule"]] = None, - disable_local_auth: Optional[bool] = None, - disable_device_sas: Optional[bool] = None, - disable_module_sas: Optional[bool] = None, - restrict_outbound_network_access: Optional[bool] = None, - allowed_fqdn_list: Optional[list[str]] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - ip_filter_rules: Optional[list["_models.IpFilterRule"]] = None, - network_rule_sets: Optional["_models.NetworkRuleSetProperties"] = None, - min_tls_version: Optional[str] = None, - private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = None, - event_hub_endpoints: Optional[dict[str, "_models.EventHubProperties"]] = None, - routing: Optional["_models.RoutingProperties"] = None, - storage_endpoints: Optional[dict[str, "_models.StorageEndpointProperties"]] = None, - messaging_endpoints: Optional[dict[str, "_models.MessagingEndpointProperties"]] = None, - enable_file_upload_notifications: Optional[bool] = None, - cloud_to_device: Optional["_models.CloudToDeviceProperties"] = None, - comments: Optional[str] = None, - device_streams: Optional["_models.IotHubPropertiesDeviceStreams"] = None, - features: Optional[Union[str, "_models.Capabilities"]] = None, - encryption: Optional["_models.EncryptionPropertiesDescription"] = None, - enable_data_residency: Optional[bool] = None, - root_certificate: Optional["_models.RootCertificateProperties"] = None, - ip_version: Optional[Union[str, "_models.IpVersion"]] = None, - device_registry: Optional["_models.DeviceRegistry"] = None, - **kwargs: Any - ) -> None: - """ - :keyword authorization_policies: The shared access policies you can use to secure a connection - to the IoT hub. - :paramtype authorization_policies: - list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :keyword disable_local_auth: If true, SAS tokens with Iot hub scoped SAS keys cannot be used - for authentication. - :paramtype disable_local_auth: bool - :keyword disable_device_sas: If true, all device(including Edge devices but excluding modules) - scoped SAS keys cannot be used for authentication. - :paramtype disable_device_sas: bool - :keyword disable_module_sas: If true, all module scoped SAS keys cannot be used for - authentication. - :paramtype disable_module_sas: bool - :keyword restrict_outbound_network_access: If true, egress from IotHub will be restricted to - only the allowed FQDNs that are configured via allowedFqdnList. - :paramtype restrict_outbound_network_access: bool - :keyword allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from - Iot Hub. - :paramtype allowed_fqdn_list: list[str] - :keyword public_network_access: Whether requests from Public Network are allowed. Known values - are: "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.iothub.models.PublicNetworkAccess - :keyword ip_filter_rules: The IP filter rules. - :paramtype ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] - :keyword network_rule_sets: Network Rule Set Properties of IotHub. - :paramtype network_rule_sets: ~azure.mgmt.iothub.models.NetworkRuleSetProperties - :keyword min_tls_version: Specifies the minimum TLS version to support for this hub. Can be set - to "1.2" to have clients that use a TLS version below 1.2 to be rejected. - :paramtype min_tls_version: str - :keyword private_endpoint_connections: Private endpoint connections created on this IotHub. - :paramtype private_endpoint_connections: - list[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :keyword event_hub_endpoints: The Event Hub-compatible endpoint properties. The only possible - keys to this dictionary is events. This key has to be present in the dictionary while making - create or update calls for the IoT hub. - :paramtype event_hub_endpoints: dict[str, ~azure.mgmt.iothub.models.EventHubProperties] - :keyword routing: The routing related properties of the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - :paramtype routing: ~azure.mgmt.iothub.models.RoutingProperties - :keyword storage_endpoints: The list of Azure Storage endpoints where you can upload files. - Currently you can configure only one Azure Storage account and that MUST have its key as - $default. Specifying more than one storage account causes an error to be thrown. Not specifying - a value for this property when the enableFileUploadNotifications property is set to True, - causes an error to be thrown. - :paramtype storage_endpoints: dict[str, ~azure.mgmt.iothub.models.StorageEndpointProperties] - :keyword messaging_endpoints: The messaging endpoint properties for the file upload - notification queue. - :paramtype messaging_endpoints: dict[str, - ~azure.mgmt.iothub.models.MessagingEndpointProperties] - :keyword enable_file_upload_notifications: If True, file upload notifications are enabled. - :paramtype enable_file_upload_notifications: bool - :keyword cloud_to_device: The IoT hub cloud-to-device messaging properties. - :paramtype cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties - :keyword comments: IoT hub comments. - :paramtype comments: str - :keyword device_streams: The device streams properties of iothub. - :paramtype device_streams: ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams - :keyword features: The capabilities and features enabled for the IoT hub. Known values are: - "None" and "DeviceManagement". - :paramtype features: str or ~azure.mgmt.iothub.models.Capabilities - :keyword encryption: The encryption properties for the IoT hub. - :paramtype encryption: ~azure.mgmt.iothub.models.EncryptionPropertiesDescription - :keyword enable_data_residency: This property when set to true, will enable data residency, - thus, disabling disaster recovery. - :paramtype enable_data_residency: bool - :keyword root_certificate: This property store root certificate related information. - :paramtype root_certificate: ~azure.mgmt.iothub.models.RootCertificateProperties - :keyword ip_version: This property specifies the IP Version the hub is currently utilizing. - Known values are: "ipv4", "ipv6", and "ipv4ipv6". - :paramtype ip_version: str or ~azure.mgmt.iothub.models.IpVersion - :keyword device_registry: Represents properties related to the Azure Device Registry (ADR). - :paramtype device_registry: ~azure.mgmt.iothub.models.DeviceRegistry - """ - super().__init__(**kwargs) - self.authorization_policies = authorization_policies - self.disable_local_auth = disable_local_auth - self.disable_device_sas = disable_device_sas - self.disable_module_sas = disable_module_sas - self.restrict_outbound_network_access = restrict_outbound_network_access - self.allowed_fqdn_list = allowed_fqdn_list - self.public_network_access = public_network_access - self.ip_filter_rules = ip_filter_rules - self.network_rule_sets = network_rule_sets - self.min_tls_version = min_tls_version - self.private_endpoint_connections = private_endpoint_connections - self.provisioning_state: Optional[str] = None - self.state: Optional[str] = None - self.host_name: Optional[str] = None - self.event_hub_endpoints = event_hub_endpoints - self.routing = routing - self.storage_endpoints = storage_endpoints - self.messaging_endpoints = messaging_endpoints - self.enable_file_upload_notifications = enable_file_upload_notifications - self.cloud_to_device = cloud_to_device - self.comments = comments - self.device_streams = device_streams - self.features = features - self.encryption = encryption - self.locations: Optional[list["_models.IotHubLocationDescription"]] = None - self.enable_data_residency = enable_data_residency - self.root_certificate = root_certificate - self.ip_version = ip_version - self.device_registry = device_registry - - -class IotHubPropertiesDeviceStreams(_serialization.Model): - """The device streams properties of iothub. - - :ivar streaming_endpoints: List of Device Streams Endpoints. - :vartype streaming_endpoints: list[str] - """ - - _attribute_map = { - "streaming_endpoints": {"key": "streamingEndpoints", "type": "[str]"}, - } - - def __init__(self, *, streaming_endpoints: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword streaming_endpoints: List of Device Streams Endpoints. - :paramtype streaming_endpoints: list[str] - """ - super().__init__(**kwargs) - self.streaming_endpoints = streaming_endpoints - - -class IotHubQuotaMetricInfo(_serialization.Model): - """Quota metrics properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the quota metric. - :vartype name: str - :ivar current_value: The current value for the quota metric. - :vartype current_value: int - :ivar max_value: The maximum value of the quota metric. - :vartype max_value: int - """ - - _validation = { - "name": {"readonly": True}, - "current_value": {"readonly": True}, - "max_value": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "current_value": {"key": "currentValue", "type": "int"}, - "max_value": {"key": "maxValue", "type": "int"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.current_value: Optional[int] = None - self.max_value: Optional[int] = None - - -class IotHubQuotaMetricInfoListResult(_serialization.Model): - """The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The array of quota metrics objects. - :vartype value: list[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] - :ivar next_link: The next link. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[IotHubQuotaMetricInfo]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.IotHubQuotaMetricInfo"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The array of quota metrics objects. - :paramtype value: list[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class IotHubSkuDescription(_serialization.Model): - """SKU properties. - - 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 server. - - :ivar resource_type: The type of the resource. - :vartype resource_type: str - :ivar sku: The type of the resource. Required. - :vartype sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :ivar capacity: IotHub capacity. Required. - :vartype capacity: ~azure.mgmt.iothub.models.IotHubCapacity - """ - - _validation = { - "resource_type": {"readonly": True}, - "sku": {"required": True}, - "capacity": {"required": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "sku": {"key": "sku", "type": "IotHubSkuInfo"}, - "capacity": {"key": "capacity", "type": "IotHubCapacity"}, - } - - def __init__(self, *, sku: "_models.IotHubSkuInfo", capacity: "_models.IotHubCapacity", **kwargs: Any) -> None: - """ - :keyword sku: The type of the resource. Required. - :paramtype sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :keyword capacity: IotHub capacity. Required. - :paramtype capacity: ~azure.mgmt.iothub.models.IotHubCapacity - """ - super().__init__(**kwargs) - self.resource_type: Optional[str] = None - self.sku = sku - self.capacity = capacity - - -class IotHubSkuDescriptionListResult(_serialization.Model): - """The JSON-serialized array of IotHubSkuDescription objects with a next link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The array of IotHubSkuDescription. - :vartype value: list[~azure.mgmt.iothub.models.IotHubSkuDescription] - :ivar next_link: The next link. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[IotHubSkuDescription]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.IotHubSkuDescription"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The array of IotHubSkuDescription. - :paramtype value: list[~azure.mgmt.iothub.models.IotHubSkuDescription] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class IotHubSkuInfo(_serialization.Model): - """Information about the SKU of the IoT hub. - - 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 server. - - :ivar name: The name of the SKU. Required. Known values are: "F1", "S1", "S2", "S3", "B1", - "B2", "B3", and "GEN2". - :vartype name: str or ~azure.mgmt.iothub.models.IotHubSku - :ivar tier: The billing tier for the IoT hub. Known values are: "Free", "Standard", "Basic", - and "Generation2". - :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier - :ivar capacity: The number of provisioned IoT Hub units. See: - https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - :vartype capacity: int - """ - - _validation = { - "name": {"required": True}, - "tier": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "tier": {"key": "tier", "type": "str"}, - "capacity": {"key": "capacity", "type": "int"}, - } - - def __init__(self, *, name: Union[str, "_models.IotHubSku"], capacity: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword name: The name of the SKU. Required. Known values are: "F1", "S1", "S2", "S3", "B1", - "B2", "B3", and "GEN2". - :paramtype name: str or ~azure.mgmt.iothub.models.IotHubSku - :keyword capacity: The number of provisioned IoT Hub units. See: - https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - :paramtype capacity: int - """ - super().__init__(**kwargs) - self.name = name - self.tier: Optional[Union[str, "_models.IotHubSkuTier"]] = None - self.capacity = capacity - - -class IpFilterRule(_serialization.Model): - """The IP filter rules for the IoT hub. - - All required parameters must be populated in order to send to server. - - :ivar filter_name: The name of the IP filter rule. Required. - :vartype filter_name: str - :ivar action: The desired action for requests captured by this rule. Required. Known values - are: "Accept" and "Reject". - :vartype action: str or ~azure.mgmt.iothub.models.IpFilterActionType - :ivar ip_mask: A string that contains the IP address range in CIDR notation for the rule. - Required. - :vartype ip_mask: str - """ - - _validation = { - "filter_name": {"required": True}, - "action": {"required": True}, - "ip_mask": {"required": True}, - } - - _attribute_map = { - "filter_name": {"key": "filterName", "type": "str"}, - "action": {"key": "action", "type": "str"}, - "ip_mask": {"key": "ipMask", "type": "str"}, - } - - def __init__( - self, *, filter_name: str, action: Union[str, "_models.IpFilterActionType"], ip_mask: str, **kwargs: Any - ) -> None: - """ - :keyword filter_name: The name of the IP filter rule. Required. - :paramtype filter_name: str - :keyword action: The desired action for requests captured by this rule. Required. Known values - are: "Accept" and "Reject". - :paramtype action: str or ~azure.mgmt.iothub.models.IpFilterActionType - :keyword ip_mask: A string that contains the IP address range in CIDR notation for the rule. - Required. - :paramtype ip_mask: str - """ - super().__init__(**kwargs) - self.filter_name = filter_name - self.action = action - self.ip_mask = ip_mask - - -class JobResponse(_serialization.Model): - """The properties of the Job Response object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar job_id: The job identifier. - :vartype job_id: str - :ivar start_time_utc: The start time of the job. - :vartype start_time_utc: ~datetime.datetime - :ivar end_time_utc: The time the job stopped processing. - :vartype end_time_utc: ~datetime.datetime - :ivar type: The type of the job. Known values are: "unknown", "export", "import", "backup", - "readDeviceProperties", "writeDeviceProperties", "updateDeviceConfiguration", "rebootDevice", - "factoryResetDevice", "firmwareUpdate", and "import". - :vartype type: str or ~azure.mgmt.iothub.models.JobType - :ivar status: The status of the job. Known values are: "unknown", "enqueued", "running", - "completed", "failed", and "cancelled". - :vartype status: str or ~azure.mgmt.iothub.models.JobStatus - :ivar failure_reason: If status == failed, this string containing the reason for the failure. - :vartype failure_reason: str - :ivar status_message: The status message for the job. - :vartype status_message: str - :ivar parent_job_id: The job identifier of the parent job, if any. - :vartype parent_job_id: str - """ - - _validation = { - "job_id": {"readonly": True}, - "start_time_utc": {"readonly": True}, - "end_time_utc": {"readonly": True}, - "type": {"readonly": True}, - "status": {"readonly": True}, - "failure_reason": {"readonly": True}, - "status_message": {"readonly": True}, - "parent_job_id": {"readonly": True}, - } - - _attribute_map = { - "job_id": {"key": "jobId", "type": "str"}, - "start_time_utc": {"key": "startTimeUtc", "type": "rfc-1123"}, - "end_time_utc": {"key": "endTimeUtc", "type": "rfc-1123"}, - "type": {"key": "type", "type": "str"}, - "status": {"key": "status", "type": "str"}, - "failure_reason": {"key": "failureReason", "type": "str"}, - "status_message": {"key": "statusMessage", "type": "str"}, - "parent_job_id": {"key": "parentJobId", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.job_id: Optional[str] = None - self.start_time_utc: Optional[datetime.datetime] = None - self.end_time_utc: Optional[datetime.datetime] = None - self.type: Optional[Union[str, "_models.JobType"]] = None - self.status: Optional[Union[str, "_models.JobStatus"]] = None - self.failure_reason: Optional[str] = None - self.status_message: Optional[str] = None - self.parent_job_id: Optional[str] = None - - -class JobResponseListResult(_serialization.Model): - """The JSON-serialized array of JobResponse objects with a next link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The array of JobResponse objects. - :vartype value: list[~azure.mgmt.iothub.models.JobResponse] - :ivar next_link: The next link. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[JobResponse]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.JobResponse"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The array of JobResponse objects. - :paramtype value: list[~azure.mgmt.iothub.models.JobResponse] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class KeyVaultKeyProperties(_serialization.Model): - """The properties of the KeyVault key. - - :ivar key_identifier: The identifier of the key. - :vartype key_identifier: str - :ivar identity: Managed identity properties of KeyVault Key. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - """ - - _attribute_map = { - "key_identifier": {"key": "keyIdentifier", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - } - - def __init__( - self, - *, - key_identifier: Optional[str] = None, - identity: Optional["_models.ManagedIdentity"] = None, - **kwargs: Any - ) -> None: - """ - :keyword key_identifier: The identifier of the key. - :paramtype key_identifier: str - :keyword identity: Managed identity properties of KeyVault Key. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - """ - super().__init__(**kwargs) - self.key_identifier = key_identifier - self.identity = identity - - -class ManagedIdentity(_serialization.Model): - """The properties of the Managed identity. - - :ivar user_assigned_identity: The user assigned identity. - :vartype user_assigned_identity: str - """ - - _attribute_map = { - "user_assigned_identity": {"key": "userAssignedIdentity", "type": "str"}, - } - - def __init__(self, *, user_assigned_identity: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword user_assigned_identity: The user assigned identity. - :paramtype user_assigned_identity: str - """ - super().__init__(**kwargs) - self.user_assigned_identity = user_assigned_identity - - -class MatchedRoute(_serialization.Model): - """Routes that matched. - - :ivar properties: Properties of routes that matched. - :vartype properties: ~azure.mgmt.iothub.models.RouteProperties - """ - - _attribute_map = { - "properties": {"key": "properties", "type": "RouteProperties"}, - } - - def __init__(self, *, properties: Optional["_models.RouteProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: Properties of routes that matched. - :paramtype properties: ~azure.mgmt.iothub.models.RouteProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class MessagingEndpointProperties(_serialization.Model): - """The properties of the messaging endpoints used by this IoT hub. - - :ivar lock_duration_as_iso8601: The lock duration. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :vartype lock_duration_as_iso8601: ~datetime.timedelta - :ivar ttl_as_iso8601: The period of time for which a message is available to consume before it - is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :vartype ttl_as_iso8601: ~datetime.timedelta - :ivar max_delivery_count: The number of times the IoT hub attempts to deliver a message. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :vartype max_delivery_count: int - """ - - _validation = { - "max_delivery_count": {"maximum": 100, "minimum": 1}, - } - - _attribute_map = { - "lock_duration_as_iso8601": {"key": "lockDurationAsIso8601", "type": "duration"}, - "ttl_as_iso8601": {"key": "ttlAsIso8601", "type": "duration"}, - "max_delivery_count": {"key": "maxDeliveryCount", "type": "int"}, - } - - def __init__( - self, - *, - lock_duration_as_iso8601: Optional[datetime.timedelta] = None, - ttl_as_iso8601: Optional[datetime.timedelta] = None, - max_delivery_count: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword lock_duration_as_iso8601: The lock duration. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :paramtype lock_duration_as_iso8601: ~datetime.timedelta - :keyword ttl_as_iso8601: The period of time for which a message is available to consume before - it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :paramtype ttl_as_iso8601: ~datetime.timedelta - :keyword max_delivery_count: The number of times the IoT hub attempts to deliver a message. - See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :paramtype max_delivery_count: int - """ - super().__init__(**kwargs) - self.lock_duration_as_iso8601 = lock_duration_as_iso8601 - self.ttl_as_iso8601 = ttl_as_iso8601 - self.max_delivery_count = max_delivery_count - - -class Name(_serialization.Model): - """Name of Iot Hub type. - - :ivar value: IotHub type. - :vartype value: str - :ivar localized_value: Localized value of name. - :vartype localized_value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - "localized_value": {"key": "localizedValue", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: IotHub type. - :paramtype value: str - :keyword localized_value: Localized value of name. - :paramtype localized_value: str - """ - super().__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class NetworkRuleSetIpRule(_serialization.Model): - """IP Rule to be applied as part of Network Rule Set. - - All required parameters must be populated in order to send to server. - - :ivar filter_name: Name of the IP filter rule. Required. - :vartype filter_name: str - :ivar action: IP Filter Action. "Allow" - :vartype action: str or ~azure.mgmt.iothub.models.NetworkRuleIPAction - :ivar ip_mask: A string that contains the IP address range in CIDR notation for the rule. - Required. - :vartype ip_mask: str - """ - - _validation = { - "filter_name": {"required": True}, - "ip_mask": {"required": True}, - } - - _attribute_map = { - "filter_name": {"key": "filterName", "type": "str"}, - "action": {"key": "action", "type": "str"}, - "ip_mask": {"key": "ipMask", "type": "str"}, - } - - def __init__( - self, - *, - filter_name: str, - ip_mask: str, - action: Union[str, "_models.NetworkRuleIPAction"] = "Allow", - **kwargs: Any - ) -> None: - """ - :keyword filter_name: Name of the IP filter rule. Required. - :paramtype filter_name: str - :keyword action: IP Filter Action. "Allow" - :paramtype action: str or ~azure.mgmt.iothub.models.NetworkRuleIPAction - :keyword ip_mask: A string that contains the IP address range in CIDR notation for the rule. - Required. - :paramtype ip_mask: str - """ - super().__init__(**kwargs) - self.filter_name = filter_name - self.action = action - self.ip_mask = ip_mask - - -class NetworkRuleSetProperties(_serialization.Model): - """Network Rule Set Properties of IotHub. - - All required parameters must be populated in order to send to server. - - :ivar default_action: Default Action for Network Rule Set. Known values are: "Deny" and - "Allow". - :vartype default_action: str or ~azure.mgmt.iothub.models.DefaultAction - :ivar apply_to_built_in_event_hub_endpoint: If True, then Network Rule Set is also applied to - BuiltIn EventHub EndPoint of IotHub. Required. - :vartype apply_to_built_in_event_hub_endpoint: bool - :ivar ip_rules: List of IP Rules. Required. - :vartype ip_rules: list[~azure.mgmt.iothub.models.NetworkRuleSetIpRule] - """ - - _validation = { - "apply_to_built_in_event_hub_endpoint": {"required": True}, - "ip_rules": {"required": True}, - } - - _attribute_map = { - "default_action": {"key": "defaultAction", "type": "str"}, - "apply_to_built_in_event_hub_endpoint": {"key": "applyToBuiltInEventHubEndpoint", "type": "bool"}, - "ip_rules": {"key": "ipRules", "type": "[NetworkRuleSetIpRule]"}, - } - - def __init__( - self, - *, - apply_to_built_in_event_hub_endpoint: bool, - ip_rules: list["_models.NetworkRuleSetIpRule"], - default_action: Union[str, "_models.DefaultAction"] = "Deny", - **kwargs: Any - ) -> None: - """ - :keyword default_action: Default Action for Network Rule Set. Known values are: "Deny" and - "Allow". - :paramtype default_action: str or ~azure.mgmt.iothub.models.DefaultAction - :keyword apply_to_built_in_event_hub_endpoint: If True, then Network Rule Set is also applied - to BuiltIn EventHub EndPoint of IotHub. Required. - :paramtype apply_to_built_in_event_hub_endpoint: bool - :keyword ip_rules: List of IP Rules. Required. - :paramtype ip_rules: list[~azure.mgmt.iothub.models.NetworkRuleSetIpRule] - """ - super().__init__(**kwargs) - self.default_action = default_action - self.apply_to_built_in_event_hub_endpoint = apply_to_built_in_event_hub_endpoint - self.ip_rules = ip_rules - - -class Operation(_serialization.Model): - """IoT Hub REST API operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Operation name: {provider}/{resource}/{read | write | action | delete}. - :vartype name: str - :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.iothub.models.OperationDisplay - """ - - _validation = { - "name": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display": {"key": "display", "type": "OperationDisplay"}, - } - - def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: - """ - :keyword display: The object that represents the operation. - :paramtype display: ~azure.mgmt.iothub.models.OperationDisplay - """ - super().__init__(**kwargs) - self.name: Optional[str] = None - self.display = display - - -class OperationDisplay(_serialization.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 Devices. - :vartype provider: str - :ivar resource: Resource Type: IotHubs. - :vartype resource: str - :ivar operation: Name of the operation. - :vartype operation: str - :ivar description: Description of the operation. - :vartype description: str - """ - - _validation = { - "provider": {"readonly": True}, - "resource": {"readonly": True}, - "operation": {"readonly": True}, - "description": {"readonly": True}, - } - - _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: Any) -> None: - """ """ - super().__init__(**kwargs) - self.provider: Optional[str] = None - self.resource: Optional[str] = None - self.operation: Optional[str] = None - self.description: Optional[str] = None - - -class OperationInputs(_serialization.Model): - """Input values. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the IoT hub to check. Required. - :vartype name: str - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: The name of the IoT hub to check. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class OperationListResult(_serialization.Model): - """Result of the request to list IoT Hub operations. It contains a list of operations and a URL - link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of IoT Hub operations supported by the Microsoft.Devices resource provider. - :vartype value: list[~azure.mgmt.iothub.models.Operation] - :ivar next_link: URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[Operation]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value: Optional[list["_models.Operation"]] = None - self.next_link: Optional[str] = None - - -class PrivateEndpoint(_serialization.Model): - """The private endpoint property of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource identifier. - :vartype id: str - """ - - _validation = { - "id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - - -class PrivateEndpointConnection(_serialization.Model): - """The private endpoint connection of an IotHub. - - 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 server. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :ivar properties: The properties of a private endpoint connection. Required. - :vartype properties: ~azure.mgmt.iothub.models.PrivateEndpointConnectionProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "properties": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "properties": {"key": "properties", "type": "PrivateEndpointConnectionProperties"}, - } - - def __init__(self, *, properties: "_models.PrivateEndpointConnectionProperties", **kwargs: Any) -> None: - """ - :keyword properties: The properties of a private endpoint connection. Required. - :paramtype properties: ~azure.mgmt.iothub.models.PrivateEndpointConnectionProperties - """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.properties = properties - - -class PrivateEndpointConnectionProperties(_serialization.Model): - """The properties of a private endpoint connection. - - All required parameters must be populated in order to send to server. - - :ivar private_endpoint: The private endpoint property of a private endpoint connection. - :vartype private_endpoint: ~azure.mgmt.iothub.models.PrivateEndpoint - :ivar private_link_service_connection_state: The current state of a private endpoint - connection. Required. - :vartype private_link_service_connection_state: - ~azure.mgmt.iothub.models.PrivateLinkServiceConnectionState - """ - - _validation = { - "private_link_service_connection_state": {"required": True}, - } - - _attribute_map = { - "private_endpoint": {"key": "privateEndpoint", "type": "PrivateEndpoint"}, - "private_link_service_connection_state": { - "key": "privateLinkServiceConnectionState", - "type": "PrivateLinkServiceConnectionState", - }, - } - - def __init__( - self, - *, - private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState", - private_endpoint: Optional["_models.PrivateEndpoint"] = None, - **kwargs: Any - ) -> None: - """ - :keyword private_endpoint: The private endpoint property of a private endpoint connection. - :paramtype private_endpoint: ~azure.mgmt.iothub.models.PrivateEndpoint - :keyword private_link_service_connection_state: The current state of a private endpoint - connection. Required. - :paramtype private_link_service_connection_state: - ~azure.mgmt.iothub.models.PrivateLinkServiceConnectionState - """ - super().__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateLinkResources(_serialization.Model): - """The available private link resources for an IotHub. - - :ivar value: The list of available private link resources for an IotHub. - :vartype value: list[~azure.mgmt.iothub.models.GroupIdInformation] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[GroupIdInformation]"}, - } - - def __init__(self, *, value: Optional[list["_models.GroupIdInformation"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of available private link resources for an IotHub. - :paramtype value: list[~azure.mgmt.iothub.models.GroupIdInformation] - """ - super().__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionState(_serialization.Model): - """The current state of a private endpoint connection. - - All required parameters must be populated in order to send to server. - - :ivar status: The status of a private endpoint connection. Required. Known values are: - "Pending", "Approved", "Rejected", and "Disconnected". - :vartype status: str or ~azure.mgmt.iothub.models.PrivateLinkServiceConnectionStatus - :ivar description: The description for the current state of a private endpoint connection. - Required. - :vartype description: str - :ivar actions_required: Actions required for a private endpoint connection. - :vartype actions_required: str - """ - - _validation = { - "status": {"required": True}, - "description": {"required": True}, - } - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "actions_required": {"key": "actionsRequired", "type": "str"}, - } - - def __init__( - self, - *, - status: Union[str, "_models.PrivateLinkServiceConnectionStatus"], - description: str, - actions_required: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The status of a private endpoint connection. Required. Known values are: - "Pending", "Approved", "Rejected", and "Disconnected". - :paramtype status: str or ~azure.mgmt.iothub.models.PrivateLinkServiceConnectionStatus - :keyword description: The description for the current state of a private endpoint connection. - Required. - :paramtype description: str - :keyword actions_required: Actions required for a private endpoint connection. - :paramtype actions_required: str - """ - super().__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = actions_required - - -class RegistryStatistics(_serialization.Model): - """Identity registry statistics. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar total_device_count: The total count of devices in the identity registry. - :vartype total_device_count: int - :ivar enabled_device_count: The count of enabled devices in the identity registry. - :vartype enabled_device_count: int - :ivar disabled_device_count: The count of disabled devices in the identity registry. - :vartype disabled_device_count: int - """ - - _validation = { - "total_device_count": {"readonly": True}, - "enabled_device_count": {"readonly": True}, - "disabled_device_count": {"readonly": True}, - } - - _attribute_map = { - "total_device_count": {"key": "totalDeviceCount", "type": "int"}, - "enabled_device_count": {"key": "enabledDeviceCount", "type": "int"}, - "disabled_device_count": {"key": "disabledDeviceCount", "type": "int"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.total_device_count: Optional[int] = None - self.enabled_device_count: Optional[int] = None - self.disabled_device_count: Optional[int] = None - - -class RootCertificateProperties(_serialization.Model): - """This property store root certificate related information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar enable_root_certificate_v2: This property when set to true, hub will use G2 cert; while - it's set to false, hub uses Baltimore Cert. - :vartype enable_root_certificate_v2: bool - :ivar last_updated_time_utc: the last update time to root certificate flag. - :vartype last_updated_time_utc: ~datetime.datetime - """ - - _validation = { - "last_updated_time_utc": {"readonly": True}, - } - - _attribute_map = { - "enable_root_certificate_v2": {"key": "enableRootCertificateV2", "type": "bool"}, - "last_updated_time_utc": {"key": "lastUpdatedTimeUtc", "type": "iso-8601"}, - } - - def __init__(self, *, enable_root_certificate_v2: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enable_root_certificate_v2: This property when set to true, hub will use G2 cert; - while it's set to false, hub uses Baltimore Cert. - :paramtype enable_root_certificate_v2: bool - """ - super().__init__(**kwargs) - self.enable_root_certificate_v2 = enable_root_certificate_v2 - self.last_updated_time_utc: Optional[datetime.datetime] = None - - -class RouteCompilationError(_serialization.Model): - """Compilation error when evaluating route. - - :ivar message: Route error message. - :vartype message: str - :ivar severity: Severity of the route error. Known values are: "error" and "warning". - :vartype severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity - :ivar location: Location where the route error happened. - :vartype location: ~azure.mgmt.iothub.models.RouteErrorRange - """ - - _attribute_map = { - "message": {"key": "message", "type": "str"}, - "severity": {"key": "severity", "type": "str"}, - "location": {"key": "location", "type": "RouteErrorRange"}, - } - - def __init__( - self, - *, - message: Optional[str] = None, - severity: Optional[Union[str, "_models.RouteErrorSeverity"]] = None, - location: Optional["_models.RouteErrorRange"] = None, - **kwargs: Any - ) -> None: - """ - :keyword message: Route error message. - :paramtype message: str - :keyword severity: Severity of the route error. Known values are: "error" and "warning". - :paramtype severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity - :keyword location: Location where the route error happened. - :paramtype location: ~azure.mgmt.iothub.models.RouteErrorRange - """ - super().__init__(**kwargs) - self.message = message - self.severity = severity - self.location = location - - -class RouteErrorPosition(_serialization.Model): - """Position where the route error happened. - - :ivar line: Line where the route error happened. - :vartype line: int - :ivar column: Column where the route error happened. - :vartype column: int - """ - - _attribute_map = { - "line": {"key": "line", "type": "int"}, - "column": {"key": "column", "type": "int"}, - } - - def __init__(self, *, line: Optional[int] = None, column: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword line: Line where the route error happened. - :paramtype line: int - :keyword column: Column where the route error happened. - :paramtype column: int - """ - super().__init__(**kwargs) - self.line = line - self.column = column - - -class RouteErrorRange(_serialization.Model): - """Range of route errors. - - :ivar start: Start where the route error happened. - :vartype start: ~azure.mgmt.iothub.models.RouteErrorPosition - :ivar end: End where the route error happened. - :vartype end: ~azure.mgmt.iothub.models.RouteErrorPosition - """ - - _attribute_map = { - "start": {"key": "start", "type": "RouteErrorPosition"}, - "end": {"key": "end", "type": "RouteErrorPosition"}, - } - - def __init__( - self, - *, - start: Optional["_models.RouteErrorPosition"] = None, - end: Optional["_models.RouteErrorPosition"] = None, - **kwargs: Any - ) -> None: - """ - :keyword start: Start where the route error happened. - :paramtype start: ~azure.mgmt.iothub.models.RouteErrorPosition - :keyword end: End where the route error happened. - :paramtype end: ~azure.mgmt.iothub.models.RouteErrorPosition - """ - super().__init__(**kwargs) - self.start = start - self.end = end - - -class RouteProperties(_serialization.Model): - """The properties of a routing rule that your IoT hub uses to route messages to endpoints. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the route. The name can only include alphanumeric characters, periods, - underscores, hyphens, has a maximum length of 64 characters, and must be unique. Required. - :vartype name: str - :ivar source: The source that the routing rule is to be applied to, such as DeviceMessages. - Required. Known values are: "Invalid", "DeviceMessages", "TwinChangeEvents", - "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", "DigitalTwinChangeEvents", - "DeviceConnectionStateEvents", and "MqttBrokerMessages". - :vartype source: str or ~azure.mgmt.iothub.models.RoutingSource - :ivar condition: The condition that is evaluated to apply the routing rule. If no condition is - provided, it evaluates to true by default. For grammar, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language. - :vartype condition: str - :ivar endpoint_names: The list of endpoints to which messages that satisfy the condition are - routed. Currently only one endpoint is allowed. Required. - :vartype endpoint_names: list[str] - :ivar is_enabled: Used to specify whether a route is enabled. Required. - :vartype is_enabled: bool - """ - - _validation = { - "name": {"required": True, "pattern": r"^[A-Za-z0-9-._]{1,64}$"}, - "source": {"required": True}, - "endpoint_names": {"required": True, "max_items": 1, "min_items": 1}, - "is_enabled": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "source": {"key": "source", "type": "str"}, - "condition": {"key": "condition", "type": "str"}, - "endpoint_names": {"key": "endpointNames", "type": "[str]"}, - "is_enabled": {"key": "isEnabled", "type": "bool"}, - } - - def __init__( - self, - *, - name: str, - source: Union[str, "_models.RoutingSource"], - endpoint_names: list[str], - is_enabled: bool, - condition: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The name of the route. The name can only include alphanumeric characters, - periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique. - Required. - :paramtype name: str - :keyword source: The source that the routing rule is to be applied to, such as DeviceMessages. - Required. Known values are: "Invalid", "DeviceMessages", "TwinChangeEvents", - "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", "DigitalTwinChangeEvents", - "DeviceConnectionStateEvents", and "MqttBrokerMessages". - :paramtype source: str or ~azure.mgmt.iothub.models.RoutingSource - :keyword condition: The condition that is evaluated to apply the routing rule. If no condition - is provided, it evaluates to true by default. For grammar, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language. - :paramtype condition: str - :keyword endpoint_names: The list of endpoints to which messages that satisfy the condition are - routed. Currently only one endpoint is allowed. Required. - :paramtype endpoint_names: list[str] - :keyword is_enabled: Used to specify whether a route is enabled. Required. - :paramtype is_enabled: bool - """ - super().__init__(**kwargs) - self.name = name - self.source = source - self.condition = condition - self.endpoint_names = endpoint_names - self.is_enabled = is_enabled - - -class RoutingCosmosDBSqlApiProperties(_serialization.Model): - """The properties related to a cosmos DB sql container endpoint. - - 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 server. - - :ivar name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. Required. - :vartype name: str - :ivar id: Id of the cosmos DB sql container endpoint. - :vartype id: str - :ivar subscription_id: The subscription identifier of the cosmos DB account. - :vartype subscription_id: str - :ivar resource_group: The name of the resource group of the cosmos DB account. - :vartype resource_group: str - :ivar endpoint_uri: The url of the cosmos DB account. It must include the protocol https://. - Required. - :vartype endpoint_uri: str - :ivar authentication_type: Method used to authenticate against the cosmos DB sql container - endpoint. Known values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of routing cosmos DB container endpoint. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :ivar primary_key: The primary key of the cosmos DB account. - :vartype primary_key: str - :ivar secondary_key: The secondary key of the cosmos DB account. - :vartype secondary_key: str - :ivar database_name: The name of the cosmos DB database in the cosmos DB account. Required. - :vartype database_name: str - :ivar container_name: The name of the cosmos DB sql container in the cosmos DB database. - Required. - :vartype container_name: str - :ivar partition_key_name: The name of the partition key associated with this cosmos DB sql - container if one exists. This is an optional parameter. - :vartype partition_key_name: str - :ivar partition_key_template: The template for generating a synthetic partition key value for - use with this cosmos DB sql container. The template must include at least one of the following - placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be - specified at most once, but order and non-placeholder components are arbitrary. This parameter - is only required if PartitionKeyName is specified. - :vartype partition_key_template: str - """ - - _validation = { - "name": {"required": True, "pattern": r"^[A-Za-z0-9-._]{1,64}$"}, - "id": {"readonly": True}, - "endpoint_uri": {"required": True}, - "database_name": {"required": True}, - "container_name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "id": {"key": "id", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group": {"key": "resourceGroup", "type": "str"}, - "endpoint_uri": {"key": "endpointUri", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - "primary_key": {"key": "primaryKey", "type": "str"}, - "secondary_key": {"key": "secondaryKey", "type": "str"}, - "database_name": {"key": "databaseName", "type": "str"}, - "container_name": {"key": "containerName", "type": "str"}, - "partition_key_name": {"key": "partitionKeyName", "type": "str"}, - "partition_key_template": {"key": "partitionKeyTemplate", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - endpoint_uri: str, - database_name: str, - container_name: str, - subscription_id: Optional[str] = None, - resource_group: Optional[str] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - primary_key: Optional[str] = None, - secondary_key: Optional[str] = None, - partition_key_name: Optional[str] = None, - partition_key_template: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. Required. - :paramtype name: str - :keyword subscription_id: The subscription identifier of the cosmos DB account. - :paramtype subscription_id: str - :keyword resource_group: The name of the resource group of the cosmos DB account. - :paramtype resource_group: str - :keyword endpoint_uri: The url of the cosmos DB account. It must include the protocol https://. - Required. - :paramtype endpoint_uri: str - :keyword authentication_type: Method used to authenticate against the cosmos DB sql container - endpoint. Known values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of routing cosmos DB container endpoint. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :keyword primary_key: The primary key of the cosmos DB account. - :paramtype primary_key: str - :keyword secondary_key: The secondary key of the cosmos DB account. - :paramtype secondary_key: str - :keyword database_name: The name of the cosmos DB database in the cosmos DB account. Required. - :paramtype database_name: str - :keyword container_name: The name of the cosmos DB sql container in the cosmos DB database. - Required. - :paramtype container_name: str - :keyword partition_key_name: The name of the partition key associated with this cosmos DB sql - container if one exists. This is an optional parameter. - :paramtype partition_key_name: str - :keyword partition_key_template: The template for generating a synthetic partition key value - for use with this cosmos DB sql container. The template must include at least one of the - following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may - be specified at most once, but order and non-placeholder components are arbitrary. This - parameter is only required if PartitionKeyName is specified. - :paramtype partition_key_template: str - """ - super().__init__(**kwargs) - self.name = name - self.id: Optional[str] = None - self.subscription_id = subscription_id - self.resource_group = resource_group - self.endpoint_uri = endpoint_uri - self.authentication_type = authentication_type - self.identity = identity - self.primary_key = primary_key - self.secondary_key = secondary_key - self.database_name = database_name - self.container_name = container_name - self.partition_key_name = partition_key_name - self.partition_key_template = partition_key_template - - -class RoutingEndpoints(_serialization.Model): - """The properties related to the custom endpoints to which your IoT hub routes messages based on - the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for - paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs. - - :ivar service_bus_queues: The list of Service Bus queue endpoints that IoT hub routes the - messages to, based on the routing rules. - :vartype service_bus_queues: - list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] - :ivar service_bus_topics: The list of Service Bus topic endpoints that the IoT hub routes the - messages to, based on the routing rules. - :vartype service_bus_topics: - list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] - :ivar event_hubs: The list of Event Hubs endpoints that IoT hub routes messages to, based on - the routing rules. This list does not include the built-in Event Hubs endpoint. - :vartype event_hubs: list[~azure.mgmt.iothub.models.RoutingEventHubProperties] - :ivar storage_containers: The list of storage container endpoints that IoT hub routes messages - to, based on the routing rules. - :vartype storage_containers: list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] - :ivar cosmos_db_sql_containers: The list of Cosmos DB container endpoints that IoT hub routes - messages to, based on the routing rules. - :vartype cosmos_db_sql_containers: - list[~azure.mgmt.iothub.models.RoutingCosmosDBSqlApiProperties] - """ - - _attribute_map = { - "service_bus_queues": {"key": "serviceBusQueues", "type": "[RoutingServiceBusQueueEndpointProperties]"}, - "service_bus_topics": {"key": "serviceBusTopics", "type": "[RoutingServiceBusTopicEndpointProperties]"}, - "event_hubs": {"key": "eventHubs", "type": "[RoutingEventHubProperties]"}, - "storage_containers": {"key": "storageContainers", "type": "[RoutingStorageContainerProperties]"}, - "cosmos_db_sql_containers": {"key": "cosmosDBSqlContainers", "type": "[RoutingCosmosDBSqlApiProperties]"}, - } - - def __init__( - self, - *, - service_bus_queues: Optional[list["_models.RoutingServiceBusQueueEndpointProperties"]] = None, - service_bus_topics: Optional[list["_models.RoutingServiceBusTopicEndpointProperties"]] = None, - event_hubs: Optional[list["_models.RoutingEventHubProperties"]] = None, - storage_containers: Optional[list["_models.RoutingStorageContainerProperties"]] = None, - cosmos_db_sql_containers: Optional[list["_models.RoutingCosmosDBSqlApiProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword service_bus_queues: The list of Service Bus queue endpoints that IoT hub routes the - messages to, based on the routing rules. - :paramtype service_bus_queues: - list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] - :keyword service_bus_topics: The list of Service Bus topic endpoints that the IoT hub routes - the messages to, based on the routing rules. - :paramtype service_bus_topics: - list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] - :keyword event_hubs: The list of Event Hubs endpoints that IoT hub routes messages to, based on - the routing rules. This list does not include the built-in Event Hubs endpoint. - :paramtype event_hubs: list[~azure.mgmt.iothub.models.RoutingEventHubProperties] - :keyword storage_containers: The list of storage container endpoints that IoT hub routes - messages to, based on the routing rules. - :paramtype storage_containers: - list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] - :keyword cosmos_db_sql_containers: The list of Cosmos DB container endpoints that IoT hub - routes messages to, based on the routing rules. - :paramtype cosmos_db_sql_containers: - list[~azure.mgmt.iothub.models.RoutingCosmosDBSqlApiProperties] - """ - super().__init__(**kwargs) - self.service_bus_queues = service_bus_queues - self.service_bus_topics = service_bus_topics - self.event_hubs = event_hubs - self.storage_containers = storage_containers - self.cosmos_db_sql_containers = cosmos_db_sql_containers - - -class RoutingEventHubProperties(_serialization.Model): - """The properties related to an event hub endpoint. - - All required parameters must be populated in order to send to server. - - :ivar id: Id of the event hub endpoint. - :vartype id: str - :ivar connection_string: The connection string of the event hub endpoint. - :vartype connection_string: str - :ivar endpoint_uri: The url of the event hub endpoint. It must include the protocol sb://. - :vartype endpoint_uri: str - :ivar entity_path: Event hub name on the event hub namespace. - :vartype entity_path: str - :ivar authentication_type: Method used to authenticate against the event hub endpoint. Known - values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of routing event hub endpoint. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :ivar name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. Required. - :vartype name: str - :ivar subscription_id: The subscription identifier of the event hub endpoint. - :vartype subscription_id: str - :ivar resource_group: The name of the resource group of the event hub endpoint. - :vartype resource_group: str - """ - - _validation = { - "name": {"required": True, "pattern": r"^[A-Za-z0-9-._]{1,64}$"}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "connection_string": {"key": "connectionString", "type": "str"}, - "endpoint_uri": {"key": "endpointUri", "type": "str"}, - "entity_path": {"key": "entityPath", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - "name": {"key": "name", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group": {"key": "resourceGroup", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - id: Optional[str] = None, # pylint: disable=redefined-builtin - connection_string: Optional[str] = None, - endpoint_uri: Optional[str] = None, - entity_path: Optional[str] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - subscription_id: Optional[str] = None, - resource_group: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Id of the event hub endpoint. - :paramtype id: str - :keyword connection_string: The connection string of the event hub endpoint. - :paramtype connection_string: str - :keyword endpoint_uri: The url of the event hub endpoint. It must include the protocol sb://. - :paramtype endpoint_uri: str - :keyword entity_path: Event hub name on the event hub namespace. - :paramtype entity_path: str - :keyword authentication_type: Method used to authenticate against the event hub endpoint. Known - values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of routing event hub endpoint. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :keyword name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. Required. - :paramtype name: str - :keyword subscription_id: The subscription identifier of the event hub endpoint. - :paramtype subscription_id: str - :keyword resource_group: The name of the resource group of the event hub endpoint. - :paramtype resource_group: str - """ - super().__init__(**kwargs) - self.id = id - self.connection_string = connection_string - self.endpoint_uri = endpoint_uri - self.entity_path = entity_path - self.authentication_type = authentication_type - self.identity = identity - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group - - -class RoutingMessage(_serialization.Model): - """Routing message. - - :ivar body: Body of routing message. - :vartype body: str - :ivar app_properties: App properties. - :vartype app_properties: dict[str, str] - :ivar system_properties: System properties. - :vartype system_properties: dict[str, str] - """ - - _attribute_map = { - "body": {"key": "body", "type": "str"}, - "app_properties": {"key": "appProperties", "type": "{str}"}, - "system_properties": {"key": "systemProperties", "type": "{str}"}, - } - - def __init__( - self, - *, - body: Optional[str] = None, - app_properties: Optional[dict[str, str]] = None, - system_properties: Optional[dict[str, str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword body: Body of routing message. - :paramtype body: str - :keyword app_properties: App properties. - :paramtype app_properties: dict[str, str] - :keyword system_properties: System properties. - :paramtype system_properties: dict[str, str] - """ - super().__init__(**kwargs) - self.body = body - self.app_properties = app_properties - self.system_properties = system_properties - - -class RoutingProperties(_serialization.Model): - """The routing related properties of the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - - :ivar endpoints: The properties related to the custom endpoints to which your IoT hub routes - messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all - endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types - for free hubs. - :vartype endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints - :ivar routes: The list of user-provided routing rules that the IoT hub uses to route messages - to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and - a maximum of 5 routing rules are allowed for free hubs. - :vartype routes: list[~azure.mgmt.iothub.models.RouteProperties] - :ivar fallback_route: The properties of the route that is used as a fall-back route when none - of the conditions specified in the 'routes' section are met. This is an optional parameter. - When this property is not set, the messages which do not meet any of the conditions specified - in the 'routes' section get routed to the built-in eventhub endpoint. - :vartype fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :ivar enrichments: The list of user-provided enrichments that the IoT hub applies to messages - to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid. - :vartype enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] - """ - - _attribute_map = { - "endpoints": {"key": "endpoints", "type": "RoutingEndpoints"}, - "routes": {"key": "routes", "type": "[RouteProperties]"}, - "fallback_route": {"key": "fallbackRoute", "type": "FallbackRouteProperties"}, - "enrichments": {"key": "enrichments", "type": "[EnrichmentProperties]"}, - } - - def __init__( - self, - *, - endpoints: Optional["_models.RoutingEndpoints"] = None, - routes: Optional[list["_models.RouteProperties"]] = None, - fallback_route: Optional["_models.FallbackRouteProperties"] = None, - enrichments: Optional[list["_models.EnrichmentProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword endpoints: The properties related to the custom endpoints to which your IoT hub routes - messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all - endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types - for free hubs. - :paramtype endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints - :keyword routes: The list of user-provided routing rules that the IoT hub uses to route - messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid - hubs and a maximum of 5 routing rules are allowed for free hubs. - :paramtype routes: list[~azure.mgmt.iothub.models.RouteProperties] - :keyword fallback_route: The properties of the route that is used as a fall-back route when - none of the conditions specified in the 'routes' section are met. This is an optional - parameter. When this property is not set, the messages which do not meet any of the conditions - specified in the 'routes' section get routed to the built-in eventhub endpoint. - :paramtype fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :keyword enrichments: The list of user-provided enrichments that the IoT hub applies to - messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/telemetryoneventgrid. - :paramtype enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] - """ - super().__init__(**kwargs) - self.endpoints = endpoints - self.routes = routes - self.fallback_route = fallback_route - self.enrichments = enrichments - - -class RoutingServiceBusQueueEndpointProperties(_serialization.Model): - """The properties related to service bus queue endpoint types. - - All required parameters must be populated in order to send to server. - - :ivar id: Id of the service bus queue endpoint. - :vartype id: str - :ivar connection_string: The connection string of the service bus queue endpoint. - :vartype connection_string: str - :ivar endpoint_uri: The url of the service bus queue endpoint. It must include the protocol - sb://. - :vartype endpoint_uri: str - :ivar entity_path: Queue name on the service bus namespace. - :vartype entity_path: str - :ivar authentication_type: Method used to authenticate against the service bus queue endpoint. - Known values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of routing service bus queue endpoint. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :ivar name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual queue name. Required. - :vartype name: str - :ivar subscription_id: The subscription identifier of the service bus queue endpoint. - :vartype subscription_id: str - :ivar resource_group: The name of the resource group of the service bus queue endpoint. - :vartype resource_group: str - """ - - _validation = { - "name": {"required": True, "pattern": r"^[A-Za-z0-9-._]{1,64}$"}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "connection_string": {"key": "connectionString", "type": "str"}, - "endpoint_uri": {"key": "endpointUri", "type": "str"}, - "entity_path": {"key": "entityPath", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - "name": {"key": "name", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group": {"key": "resourceGroup", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - id: Optional[str] = None, # pylint: disable=redefined-builtin - connection_string: Optional[str] = None, - endpoint_uri: Optional[str] = None, - entity_path: Optional[str] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - subscription_id: Optional[str] = None, - resource_group: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Id of the service bus queue endpoint. - :paramtype id: str - :keyword connection_string: The connection string of the service bus queue endpoint. - :paramtype connection_string: str - :keyword endpoint_uri: The url of the service bus queue endpoint. It must include the protocol - sb://. - :paramtype endpoint_uri: str - :keyword entity_path: Queue name on the service bus namespace. - :paramtype entity_path: str - :keyword authentication_type: Method used to authenticate against the service bus queue - endpoint. Known values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of routing service bus queue endpoint. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :keyword name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual queue name. Required. - :paramtype name: str - :keyword subscription_id: The subscription identifier of the service bus queue endpoint. - :paramtype subscription_id: str - :keyword resource_group: The name of the resource group of the service bus queue endpoint. - :paramtype resource_group: str - """ - super().__init__(**kwargs) - self.id = id - self.connection_string = connection_string - self.endpoint_uri = endpoint_uri - self.entity_path = entity_path - self.authentication_type = authentication_type - self.identity = identity - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group - - -class RoutingServiceBusTopicEndpointProperties(_serialization.Model): - """The properties related to service bus topic endpoint types. - - All required parameters must be populated in order to send to server. - - :ivar id: Id of the service bus topic endpoint. - :vartype id: str - :ivar connection_string: The connection string of the service bus topic endpoint. - :vartype connection_string: str - :ivar endpoint_uri: The url of the service bus topic endpoint. It must include the protocol - sb://. - :vartype endpoint_uri: str - :ivar entity_path: Queue name on the service bus topic. - :vartype entity_path: str - :ivar authentication_type: Method used to authenticate against the service bus topic endpoint. - Known values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of routing service bus topic endpoint. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :ivar name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual topic name. - Required. - :vartype name: str - :ivar subscription_id: The subscription identifier of the service bus topic endpoint. - :vartype subscription_id: str - :ivar resource_group: The name of the resource group of the service bus topic endpoint. - :vartype resource_group: str - """ - - _validation = { - "name": {"required": True, "pattern": r"^[A-Za-z0-9-._]{1,64}$"}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "connection_string": {"key": "connectionString", "type": "str"}, - "endpoint_uri": {"key": "endpointUri", "type": "str"}, - "entity_path": {"key": "entityPath", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - "name": {"key": "name", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group": {"key": "resourceGroup", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - id: Optional[str] = None, # pylint: disable=redefined-builtin - connection_string: Optional[str] = None, - endpoint_uri: Optional[str] = None, - entity_path: Optional[str] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - subscription_id: Optional[str] = None, - resource_group: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Id of the service bus topic endpoint. - :paramtype id: str - :keyword connection_string: The connection string of the service bus topic endpoint. - :paramtype connection_string: str - :keyword endpoint_uri: The url of the service bus topic endpoint. It must include the protocol - sb://. - :paramtype endpoint_uri: str - :keyword entity_path: Queue name on the service bus topic. - :paramtype entity_path: str - :keyword authentication_type: Method used to authenticate against the service bus topic - endpoint. Known values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of routing service bus topic endpoint. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :keyword name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual topic name. - Required. - :paramtype name: str - :keyword subscription_id: The subscription identifier of the service bus topic endpoint. - :paramtype subscription_id: str - :keyword resource_group: The name of the resource group of the service bus topic endpoint. - :paramtype resource_group: str - """ - super().__init__(**kwargs) - self.id = id - self.connection_string = connection_string - self.endpoint_uri = endpoint_uri - self.entity_path = entity_path - self.authentication_type = authentication_type - self.identity = identity - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group - - -class RoutingStorageContainerProperties(_serialization.Model): - """The properties related to a storage container endpoint. - - All required parameters must be populated in order to send to server. - - :ivar id: Id of the storage container endpoint. - :vartype id: str - :ivar connection_string: The connection string of the storage account. - :vartype connection_string: str - :ivar endpoint_uri: The url of the storage endpoint. It must include the protocol https://. - :vartype endpoint_uri: str - :ivar authentication_type: Method used to authenticate against the storage endpoint. Known - values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of routing storage endpoint. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :ivar name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. Required. - :vartype name: str - :ivar subscription_id: The subscription identifier of the storage account. - :vartype subscription_id: str - :ivar resource_group: The name of the resource group of the storage account. - :vartype resource_group: str - :ivar container_name: The name of storage container in the storage account. Required. - :vartype container_name: str - :ivar file_name_format: File name format for the blob. Default format is - {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be - reordered. - :vartype file_name_format: str - :ivar batch_frequency_in_seconds: Time interval at which blobs are written to storage. Value - should be between 60 and 720 seconds. Default value is 300 seconds. - :vartype batch_frequency_in_seconds: int - :ivar max_chunk_size_in_bytes: Maximum number of bytes for each blob written to storage. Value - should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). - :vartype max_chunk_size_in_bytes: int - :ivar encoding: Encoding that is used to serialize messages to blobs. Supported values are - 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'. Known values are: "Avro", - "AvroDeflate", and "JSON". - :vartype encoding: str or ~azure.mgmt.iothub.models.RoutingStorageContainerPropertiesEncoding - """ - - _validation = { - "name": {"required": True, "pattern": r"^[A-Za-z0-9-._]{1,64}$"}, - "container_name": {"required": True}, - "batch_frequency_in_seconds": {"maximum": 720, "minimum": 60}, - "max_chunk_size_in_bytes": {"maximum": 524288000, "minimum": 10485760}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "connection_string": {"key": "connectionString", "type": "str"}, - "endpoint_uri": {"key": "endpointUri", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - "name": {"key": "name", "type": "str"}, - "subscription_id": {"key": "subscriptionId", "type": "str"}, - "resource_group": {"key": "resourceGroup", "type": "str"}, - "container_name": {"key": "containerName", "type": "str"}, - "file_name_format": {"key": "fileNameFormat", "type": "str"}, - "batch_frequency_in_seconds": {"key": "batchFrequencyInSeconds", "type": "int"}, - "max_chunk_size_in_bytes": {"key": "maxChunkSizeInBytes", "type": "int"}, - "encoding": {"key": "encoding", "type": "str"}, - } - - def __init__( - self, - *, - name: str, - container_name: str, - id: Optional[str] = None, # pylint: disable=redefined-builtin - connection_string: Optional[str] = None, - endpoint_uri: Optional[str] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - subscription_id: Optional[str] = None, - resource_group: Optional[str] = None, - file_name_format: Optional[str] = None, - batch_frequency_in_seconds: Optional[int] = None, - max_chunk_size_in_bytes: Optional[int] = None, - encoding: Optional[Union[str, "_models.RoutingStorageContainerPropertiesEncoding"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: Id of the storage container endpoint. - :paramtype id: str - :keyword connection_string: The connection string of the storage account. - :paramtype connection_string: str - :keyword endpoint_uri: The url of the storage endpoint. It must include the protocol https://. - :paramtype endpoint_uri: str - :keyword authentication_type: Method used to authenticate against the storage endpoint. Known - values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of routing storage endpoint. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - :keyword name: The name that identifies this endpoint. The name can only include alphanumeric - characters, periods, underscores, hyphens and has a maximum length of 64 characters. The - following names are reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. Required. - :paramtype name: str - :keyword subscription_id: The subscription identifier of the storage account. - :paramtype subscription_id: str - :keyword resource_group: The name of the resource group of the storage account. - :paramtype resource_group: str - :keyword container_name: The name of storage container in the storage account. Required. - :paramtype container_name: str - :keyword file_name_format: File name format for the blob. Default format is - {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be - reordered. - :paramtype file_name_format: str - :keyword batch_frequency_in_seconds: Time interval at which blobs are written to storage. Value - should be between 60 and 720 seconds. Default value is 300 seconds. - :paramtype batch_frequency_in_seconds: int - :keyword max_chunk_size_in_bytes: Maximum number of bytes for each blob written to storage. - Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). - :paramtype max_chunk_size_in_bytes: int - :keyword encoding: Encoding that is used to serialize messages to blobs. Supported values are - 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'. Known values are: "Avro", - "AvroDeflate", and "JSON". - :paramtype encoding: str or ~azure.mgmt.iothub.models.RoutingStorageContainerPropertiesEncoding - """ - super().__init__(**kwargs) - self.id = id - self.connection_string = connection_string - self.endpoint_uri = endpoint_uri - self.authentication_type = authentication_type - self.identity = identity - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group - self.container_name = container_name - self.file_name_format = file_name_format - self.batch_frequency_in_seconds = batch_frequency_in_seconds - self.max_chunk_size_in_bytes = max_chunk_size_in_bytes - self.encoding = encoding - - -class RoutingTwin(_serialization.Model): - """Twin reference input parameter. This is an optional parameter. - - :ivar tags: Twin Tags. - :vartype tags: JSON - :ivar properties: - :vartype properties: ~azure.mgmt.iothub.models.RoutingTwinProperties - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "object"}, - "properties": {"key": "properties", "type": "RoutingTwinProperties"}, - } - - def __init__( - self, - *, - tags: Optional[JSON] = None, - properties: Optional["_models.RoutingTwinProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Twin Tags. - :paramtype tags: JSON - :keyword properties: - :paramtype properties: ~azure.mgmt.iothub.models.RoutingTwinProperties - """ - super().__init__(**kwargs) - self.tags = tags - self.properties = properties - - -class RoutingTwinProperties(_serialization.Model): - """RoutingTwinProperties. - - :ivar desired: Twin desired properties. - :vartype desired: JSON - :ivar reported: Twin desired properties. - :vartype reported: JSON - """ - - _attribute_map = { - "desired": {"key": "desired", "type": "object"}, - "reported": {"key": "reported", "type": "object"}, - } - - def __init__(self, *, desired: Optional[JSON] = None, reported: Optional[JSON] = None, **kwargs: Any) -> None: - """ - :keyword desired: Twin desired properties. - :paramtype desired: JSON - :keyword reported: Twin desired properties. - :paramtype reported: JSON - """ - super().__init__(**kwargs) - self.desired = desired - self.reported = reported - - -class SharedAccessSignatureAuthorizationRule(_serialization.Model): - """The properties of an IoT hub shared access policy. - - All required parameters must be populated in order to send to server. - - :ivar key_name: The name of the shared access policy. Required. - :vartype key_name: str - :ivar primary_key: The primary key. - :vartype primary_key: str - :ivar secondary_key: The secondary key. - :vartype secondary_key: str - :ivar rights: The permissions assigned to the shared access policy. Required. Known values are: - "RegistryRead", "RegistryWrite", "ServiceConnect", "DeviceConnect", "RegistryRead, - RegistryWrite", "RegistryRead, ServiceConnect", "RegistryRead, DeviceConnect", "RegistryWrite, - ServiceConnect", "RegistryWrite, DeviceConnect", "ServiceConnect, DeviceConnect", - "RegistryRead, RegistryWrite, ServiceConnect", "RegistryRead, RegistryWrite, DeviceConnect", - "RegistryRead, ServiceConnect, DeviceConnect", "RegistryWrite, ServiceConnect, DeviceConnect", - and "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect". - :vartype rights: str or ~azure.mgmt.iothub.models.AccessRights - """ - - _validation = { - "key_name": {"required": True}, - "rights": {"required": True}, - } - - _attribute_map = { - "key_name": {"key": "keyName", "type": "str"}, - "primary_key": {"key": "primaryKey", "type": "str"}, - "secondary_key": {"key": "secondaryKey", "type": "str"}, - "rights": {"key": "rights", "type": "str"}, - } - - def __init__( - self, - *, - key_name: str, - rights: Union[str, "_models.AccessRights"], - primary_key: Optional[str] = None, - secondary_key: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword key_name: The name of the shared access policy. Required. - :paramtype key_name: str - :keyword primary_key: The primary key. - :paramtype primary_key: str - :keyword secondary_key: The secondary key. - :paramtype secondary_key: str - :keyword rights: The permissions assigned to the shared access policy. Required. Known values - are: "RegistryRead", "RegistryWrite", "ServiceConnect", "DeviceConnect", "RegistryRead, - RegistryWrite", "RegistryRead, ServiceConnect", "RegistryRead, DeviceConnect", "RegistryWrite, - ServiceConnect", "RegistryWrite, DeviceConnect", "ServiceConnect, DeviceConnect", - "RegistryRead, RegistryWrite, ServiceConnect", "RegistryRead, RegistryWrite, DeviceConnect", - "RegistryRead, ServiceConnect, DeviceConnect", "RegistryWrite, ServiceConnect, DeviceConnect", - and "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect". - :paramtype rights: str or ~azure.mgmt.iothub.models.AccessRights - """ - super().__init__(**kwargs) - self.key_name = key_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.rights = rights - - -class SharedAccessSignatureAuthorizationRuleListResult(_serialization.Model): # pylint: disable=name-too-long - """The list of shared access policies with a next link. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of shared access policies. - :vartype value: list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :ivar next_link: The next link. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[SharedAccessSignatureAuthorizationRule]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.SharedAccessSignatureAuthorizationRule"]] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of shared access policies. - :paramtype value: list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class StorageEndpointProperties(_serialization.Model): - """The properties of the Azure Storage endpoint for file upload. - - All required parameters must be populated in order to send to server. - - :ivar sas_ttl_as_iso8601: The period of time for which the SAS URI generated by IoT Hub for - file upload is valid. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - :vartype sas_ttl_as_iso8601: ~datetime.timedelta - :ivar connection_string: The connection string for the Azure Storage account to which files are - uploaded. Required. - :vartype connection_string: str - :ivar container_name: The name of the root container where you upload files. The container need - not exist but should be creatable using the connectionString specified. Required. - :vartype container_name: str - :ivar authentication_type: Specifies authentication type being used for connecting to the - storage account. Known values are: "keyBased" and "identityBased". - :vartype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :ivar identity: Managed identity properties of storage endpoint for file upload. - :vartype identity: ~azure.mgmt.iothub.models.ManagedIdentity - """ - - _validation = { - "connection_string": {"required": True}, - "container_name": {"required": True}, - } - - _attribute_map = { - "sas_ttl_as_iso8601": {"key": "sasTtlAsIso8601", "type": "duration"}, - "connection_string": {"key": "connectionString", "type": "str"}, - "container_name": {"key": "containerName", "type": "str"}, - "authentication_type": {"key": "authenticationType", "type": "str"}, - "identity": {"key": "identity", "type": "ManagedIdentity"}, - } - - def __init__( - self, - *, - connection_string: str, - container_name: str, - sas_ttl_as_iso8601: Optional[datetime.timedelta] = None, - authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, - identity: Optional["_models.ManagedIdentity"] = None, - **kwargs: Any - ) -> None: - """ - :keyword sas_ttl_as_iso8601: The period of time for which the SAS URI generated by IoT Hub for - file upload is valid. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - :paramtype sas_ttl_as_iso8601: ~datetime.timedelta - :keyword connection_string: The connection string for the Azure Storage account to which files - are uploaded. Required. - :paramtype connection_string: str - :keyword container_name: The name of the root container where you upload files. The container - need not exist but should be creatable using the connectionString specified. Required. - :paramtype container_name: str - :keyword authentication_type: Specifies authentication type being used for connecting to the - storage account. Known values are: "keyBased" and "identityBased". - :paramtype authentication_type: str or ~azure.mgmt.iothub.models.AuthenticationType - :keyword identity: Managed identity properties of storage endpoint for file upload. - :paramtype identity: ~azure.mgmt.iothub.models.ManagedIdentity - """ - super().__init__(**kwargs) - self.sas_ttl_as_iso8601 = sas_ttl_as_iso8601 - self.connection_string = connection_string - self.container_name = container_name - self.authentication_type = authentication_type - self.identity = identity - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.iothub.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.iothub.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - "created_by": {"key": "createdBy", "type": "str"}, - "created_by_type": {"key": "createdByType", "type": "str"}, - "created_at": {"key": "createdAt", "type": "iso-8601"}, - "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, - "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, - "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~azure.mgmt.iothub.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.iothub.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super().__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TagsResource(_serialization.Model): - """A container holding only the Tags for a resource, allowing the user to update the tags on an - IoT Hub instance. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - } - - def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - """ - super().__init__(**kwargs) - self.tags = tags - - -class TestAllRoutesInput(_serialization.Model): - """Input for testing all routes. - - :ivar routing_source: Routing source. Known values are: "Invalid", "DeviceMessages", - "TwinChangeEvents", "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", - "DigitalTwinChangeEvents", "DeviceConnectionStateEvents", and "MqttBrokerMessages". - :vartype routing_source: str or ~azure.mgmt.iothub.models.RoutingSource - :ivar message: Routing message. - :vartype message: ~azure.mgmt.iothub.models.RoutingMessage - :ivar twin: Routing Twin Reference. - :vartype twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _attribute_map = { - "routing_source": {"key": "routingSource", "type": "str"}, - "message": {"key": "message", "type": "RoutingMessage"}, - "twin": {"key": "twin", "type": "RoutingTwin"}, - } - - def __init__( - self, - *, - routing_source: Optional[Union[str, "_models.RoutingSource"]] = None, - message: Optional["_models.RoutingMessage"] = None, - twin: Optional["_models.RoutingTwin"] = None, - **kwargs: Any - ) -> None: - """ - :keyword routing_source: Routing source. Known values are: "Invalid", "DeviceMessages", - "TwinChangeEvents", "DeviceLifecycleEvents", "DeviceJobLifecycleEvents", - "DigitalTwinChangeEvents", "DeviceConnectionStateEvents", and "MqttBrokerMessages". - :paramtype routing_source: str or ~azure.mgmt.iothub.models.RoutingSource - :keyword message: Routing message. - :paramtype message: ~azure.mgmt.iothub.models.RoutingMessage - :keyword twin: Routing Twin Reference. - :paramtype twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - super().__init__(**kwargs) - self.routing_source = routing_source - self.message = message - self.twin = twin - - -class TestAllRoutesResult(_serialization.Model): - """Result of testing all routes. - - :ivar routes: JSON-serialized array of matched routes. - :vartype routes: list[~azure.mgmt.iothub.models.MatchedRoute] - """ - - _attribute_map = { - "routes": {"key": "routes", "type": "[MatchedRoute]"}, - } - - def __init__(self, *, routes: Optional[list["_models.MatchedRoute"]] = None, **kwargs: Any) -> None: - """ - :keyword routes: JSON-serialized array of matched routes. - :paramtype routes: list[~azure.mgmt.iothub.models.MatchedRoute] - """ - super().__init__(**kwargs) - self.routes = routes - - -class TestRouteInput(_serialization.Model): - """Input for testing route. - - All required parameters must be populated in order to send to server. - - :ivar message: Routing message. - :vartype message: ~azure.mgmt.iothub.models.RoutingMessage - :ivar route: Route properties. Required. - :vartype route: ~azure.mgmt.iothub.models.RouteProperties - :ivar twin: Routing Twin Reference. - :vartype twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _validation = { - "route": {"required": True}, - } - - _attribute_map = { - "message": {"key": "message", "type": "RoutingMessage"}, - "route": {"key": "route", "type": "RouteProperties"}, - "twin": {"key": "twin", "type": "RoutingTwin"}, - } - - def __init__( - self, - *, - route: "_models.RouteProperties", - message: Optional["_models.RoutingMessage"] = None, - twin: Optional["_models.RoutingTwin"] = None, - **kwargs: Any - ) -> None: - """ - :keyword message: Routing message. - :paramtype message: ~azure.mgmt.iothub.models.RoutingMessage - :keyword route: Route properties. Required. - :paramtype route: ~azure.mgmt.iothub.models.RouteProperties - :keyword twin: Routing Twin Reference. - :paramtype twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - super().__init__(**kwargs) - self.message = message - self.route = route - self.twin = twin - - -class TestRouteResult(_serialization.Model): - """Result of testing one route. - - :ivar result: Result of testing route. Known values are: "undefined", "false", and "true". - :vartype result: str or ~azure.mgmt.iothub.models.TestResultStatus - :ivar details: Detailed result of testing route. - :vartype details: ~azure.mgmt.iothub.models.TestRouteResultDetails - """ - - _attribute_map = { - "result": {"key": "result", "type": "str"}, - "details": {"key": "details", "type": "TestRouteResultDetails"}, - } - - def __init__( - self, - *, - result: Optional[Union[str, "_models.TestResultStatus"]] = None, - details: Optional["_models.TestRouteResultDetails"] = None, - **kwargs: Any - ) -> None: - """ - :keyword result: Result of testing route. Known values are: "undefined", "false", and "true". - :paramtype result: str or ~azure.mgmt.iothub.models.TestResultStatus - :keyword details: Detailed result of testing route. - :paramtype details: ~azure.mgmt.iothub.models.TestRouteResultDetails - """ - super().__init__(**kwargs) - self.result = result - self.details = details - - -class TestRouteResultDetails(_serialization.Model): - """Detailed result of testing a route. - - :ivar compilation_errors: JSON-serialized list of route compilation errors. - :vartype compilation_errors: list[~azure.mgmt.iothub.models.RouteCompilationError] - """ - - _attribute_map = { - "compilation_errors": {"key": "compilationErrors", "type": "[RouteCompilationError]"}, - } - - def __init__( - self, *, compilation_errors: Optional[list["_models.RouteCompilationError"]] = None, **kwargs: Any - ) -> None: - """ - :keyword compilation_errors: JSON-serialized list of route compilation errors. - :paramtype compilation_errors: list[~azure.mgmt.iothub.models.RouteCompilationError] - """ - super().__init__(**kwargs) - self.compilation_errors = compilation_errors - - -class UserSubscriptionQuota(_serialization.Model): - """User subscription quota response. - - :ivar id: IotHub type id. - :vartype id: str - :ivar type: Response type. - :vartype type: str - :ivar unit: Unit of IotHub type. - :vartype unit: str - :ivar current_value: Current number of IotHub type. - :vartype current_value: int - :ivar limit: Numerical limit on IotHub type. - :vartype limit: int - :ivar name: IotHub type. - :vartype name: ~azure.mgmt.iothub.models.Name - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "unit": {"key": "unit", "type": "str"}, - "current_value": {"key": "currentValue", "type": "int"}, - "limit": {"key": "limit", "type": "int"}, - "name": {"key": "name", "type": "Name"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - type: Optional[str] = None, - unit: Optional[str] = None, - current_value: Optional[int] = None, - limit: Optional[int] = None, - name: Optional["_models.Name"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: IotHub type id. - :paramtype id: str - :keyword type: Response type. - :paramtype type: str - :keyword unit: Unit of IotHub type. - :paramtype unit: str - :keyword current_value: Current number of IotHub type. - :paramtype current_value: int - :keyword limit: Numerical limit on IotHub type. - :paramtype limit: int - :keyword name: IotHub type. - :paramtype name: ~azure.mgmt.iothub.models.Name - """ - super().__init__(**kwargs) - self.id = id - self.type = type - self.unit = unit - self.current_value = current_value - self.limit = limit - self.name = name - - -class UserSubscriptionQuotaListResult(_serialization.Model): - """Json-serialized array of User subscription quota response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: - :vartype value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] - :ivar next_link: - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[UserSubscriptionQuota]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.UserSubscriptionQuota"]] = None, **kwargs: Any) -> None: - """ - :keyword value: - :paramtype value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py index 7f2b24868d73..d302fd428ec3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,12 +13,12 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import Operations # type: ignore -from ._iot_hub_resource_operations import IotHubResourceOperations # type: ignore -from ._resource_provider_common_operations import ResourceProviderCommonOperations # type: ignore -from ._certificates_operations import CertificatesOperations # type: ignore -from ._iot_hub_operations import IotHubOperations # type: ignore -from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import IotHubResourceOperations # type: ignore +from ._operations import IotHubOperations # type: ignore +from ._operations import CertificatesOperations # type: ignore +from ._operations import PrivateLinkResourcesOperations # type: ignore +from ._operations import ResourceProviderCommonOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -26,12 +26,12 @@ __all__ = [ "Operations", + "PrivateEndpointConnectionsOperations", "IotHubResourceOperations", - "ResourceProviderCommonOperations", - "CertificatesOperations", "IotHubOperations", + "CertificatesOperations", "PrivateLinkResourcesOperations", - "PrivateEndpointConnectionsOperations", + "ResourceProviderCommonOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py deleted file mode 100644 index 581f3d0acc8e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py +++ /dev/null @@ -1,857 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import IotHubClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_iot_hub_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, resource_name: str, certificate_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "certificateName": _SERIALIZER.url( - "certificate_name", certificate_name, "str", pattern=r"^[A-Za-z0-9-._]{1,64}$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - resource_name: str, - certificate_name: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "certificateName": _SERIALIZER.url( - "certificate_name", certificate_name, "str", pattern=r"^[A-Za-z0-9-._]{1,64}$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - resource_name: str, - certificate_name: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "certificateName": _SERIALIZER.url( - "certificate_name", certificate_name, "str", pattern=r"^[A-Za-z0-9-._]{1,64}$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_generate_verification_code_request( - resource_group_name: str, - resource_name: str, - certificate_name: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "certificateName": _SERIALIZER.url( - "certificate_name", certificate_name, "str", pattern=r"^[A-Za-z0-9-._]{1,64}$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_verify_request( - resource_group_name: str, - resource_name: str, - certificate_name: str, - subscription_id: str, - *, - if_match: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "certificateName": _SERIALIZER.url( - "certificate_name", certificate_name, "str", pattern=r"^[A-Za-z0-9-._]{1,64}$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class CertificatesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.IotHubClient`'s - :attr:`certificates` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_iot_hub( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> _models.CertificateListDescription: - """Get the certificate list. - - Returns the list of certificates. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: CertificateListDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateListDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateListDescription] = kwargs.pop("cls", None) - - _request = build_list_by_iot_hub_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateListDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, certificate_name: str, **kwargs: Any - ) -> _models.CertificateDescription: - """Get the certificate. - - Returns the certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - certificate_description: _models.CertificateDescription, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Upload the certificate to the IoT hub. - - Adds new or replaces existing certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param certificate_description: The certificate body. Required. - :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription - :param if_match: ETag of the Certificate. Do not specify for creating a brand new certificate. - Required to update an existing certificate. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - certificate_description: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Upload the certificate to the IoT hub. - - Adds new or replaces existing certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param certificate_description: The certificate body. Required. - :type certificate_description: IO[bytes] - :param if_match: ETag of the Certificate. Do not specify for creating a brand new certificate. - Required to update an existing certificate. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - certificate_description: Union[_models.CertificateDescription, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> _models.CertificateDescription: - """Upload the certificate to the IoT hub. - - Adds new or replaces existing certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param certificate_description: The certificate body. Is either a CertificateDescription type - or a IO[bytes] type. Required. - :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription or IO[bytes] - :param if_match: ETag of the Certificate. Do not specify for creating a brand new certificate. - Required to update an existing certificate. Default value is None. - :type if_match: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(certificate_description, (IOBase, bytes)): - _content = certificate_description - else: - _json = self._serialize.body(certificate_description, "CertificateDescription") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any - ) -> None: - """Delete an X509 certificate. - - Deletes an existing X509 certificate or does nothing if it does not exist. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def generate_verification_code( - self, resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any - ) -> _models.CertificateWithNonceDescription: - """Generate verification code for proof of possession flow. - - Generates verification code for proof of possession flow. The verification code will be used to - generate a leaf certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :return: CertificateWithNonceDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateWithNonceDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CertificateWithNonceDescription] = kwargs.pop("cls", None) - - _request = build_generate_verification_code_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateWithNonceDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def verify( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - if_match: str, - certificate_verification_body: _models.CertificateVerificationDescription, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Verify certificate's private key possession. - - Verifies the certificate's private key possession by providing the leaf cert issued by the - verifying pre uploaded certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :param certificate_verification_body: The name of the certificate. Required. - :type certificate_verification_body: - ~azure.mgmt.iothub.models.CertificateVerificationDescription - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def verify( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - if_match: str, - certificate_verification_body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CertificateDescription: - """Verify certificate's private key possession. - - Verifies the certificate's private key possession by providing the leaf cert issued by the - verifying pre uploaded certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :param certificate_verification_body: The name of the certificate. Required. - :type certificate_verification_body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def verify( - self, - resource_group_name: str, - resource_name: str, - certificate_name: str, - if_match: str, - certificate_verification_body: Union[_models.CertificateVerificationDescription, IO[bytes]], - **kwargs: Any - ) -> _models.CertificateDescription: - """Verify certificate's private key possession. - - Verifies the certificate's private key possession by providing the leaf cert issued by the - verifying pre uploaded certificate. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param certificate_name: The name of the certificate. Required. - :type certificate_name: str - :param if_match: ETag of the Certificate. Required. - :type if_match: str - :param certificate_verification_body: The name of the certificate. Is either a - CertificateVerificationDescription type or a IO[bytes] type. Required. - :type certificate_verification_body: - ~azure.mgmt.iothub.models.CertificateVerificationDescription or IO[bytes] - :return: CertificateDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.CertificateDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(certificate_verification_body, (IOBase, bytes)): - _content = certificate_verification_body - else: - _json = self._serialize.body(certificate_verification_body, "CertificateVerificationDescription") - - _request = build_verify_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - certificate_name=certificate_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CertificateDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py deleted file mode 100644 index 16635cab005e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py +++ /dev/null @@ -1,303 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import IotHubClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_manual_failover_request( - iot_hub_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover", - ) - path_format_arguments = { - "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class IotHubOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.IotHubClient`'s - :attr:`iot_hub` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def _manual_failover_initial( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: Union[_models.FailoverInput, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(failover_input, (IOBase, bytes)): - _content = failover_input - else: - _json = self._serialize.body(failover_input, "FailoverInput") - - _request = build_manual_failover_request( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_manual_failover( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: _models.FailoverInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Manually initiate a failover for the IoT Hub to its secondary region. - - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see - https://aka.ms/manualfailover. - - :param iot_hub_name: Name of the IoT hub to failover. Required. - :type iot_hub_name: str - :param resource_group_name: Name of the resource group containing the IoT hub resource. - Required. - :type resource_group_name: str - :param failover_input: Region to failover to. Must be the Azure paired region. Get the value - from the secondary location in the locations property. To learn more, see - https://aka.ms/manualfailover/region. Required. - :type failover_input: ~azure.mgmt.iothub.models.FailoverInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_manual_failover( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Manually initiate a failover for the IoT Hub to its secondary region. - - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see - https://aka.ms/manualfailover. - - :param iot_hub_name: Name of the IoT hub to failover. Required. - :type iot_hub_name: str - :param resource_group_name: Name of the resource group containing the IoT hub resource. - Required. - :type resource_group_name: str - :param failover_input: Region to failover to. Must be the Azure paired region. Get the value - from the secondary location in the locations property. To learn more, see - https://aka.ms/manualfailover/region. Required. - :type failover_input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_manual_failover( - self, - iot_hub_name: str, - resource_group_name: str, - failover_input: Union[_models.FailoverInput, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Manually initiate a failover for the IoT Hub to its secondary region. - - Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see - https://aka.ms/manualfailover. - - :param iot_hub_name: Name of the IoT hub to failover. Required. - :type iot_hub_name: str - :param resource_group_name: Name of the resource group containing the IoT hub resource. - Required. - :type resource_group_name: str - :param failover_input: Region to failover to. Must be the Azure paired region. Get the value - from the secondary location in the locations property. To learn more, see - https://aka.ms/manualfailover/region. Is either a FailoverInput type or a IO[bytes] type. - Required. - :type failover_input: ~azure.mgmt.iothub.models.FailoverInput or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._manual_failover_initial( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - failover_input=failover_input, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py deleted file mode 100644 index a7b53fb57117..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py +++ /dev/null @@ -1,3233 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import IotHubClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, resource_name: str, subscription_id: str, *, if_match: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_stats_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_valid_skus_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_event_hub_consumer_groups_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_event_hub_consumer_group_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_event_hub_consumer_group_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_event_hub_consumer_group_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), - "name": _SERIALIZER.url("name", name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_jobs_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_job_request( - resource_group_name: str, resource_name: str, job_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "jobId": _SERIALIZER.url("job_id", job_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_quota_metrics_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_endpoint_health_request( - resource_group_name: str, iot_hub_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routingEndpointsHealth", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_test_all_routes_request( - iot_hub_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testall", - ) - path_format_arguments = { - "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_test_route_request( - iot_hub_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testnew", - ) - path_format_arguments = { - "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_keys_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_keys_for_key_name_request( - resource_group_name: str, resource_name: str, key_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "keyName": _SERIALIZER.url("key_name", key_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_export_devices_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_import_devices_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class IotHubResourceOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.IotHubClient`'s - :attr:`iot_hub_resource` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.IotHubDescription: - """Get the non-security related metadata of an IoT hub. - - Get the non-security related metadata of an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: IotHubDescription or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubDescription - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: Union[_models.IotHubDescription, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(iot_hub_description, (IOBase, bytes)): - _content = iot_hub_description - else: - _json = self._serialize.body(iot_hub_description, "IotHubDescription") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: _models.IotHubDescription, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IotHubDescription]: - """Create or update the metadata of an IoT hub. - - Create or update the metadata of an Iot hub. The usual pattern to modify a property is to - retrieve the IoT hub metadata and security metadata, and then combine them with the modified - values in a new body to update the IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param iot_hub_description: The IoT hub metadata and security metadata. Required. - :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription - :param if_match: ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required - to update an existing IoT Hub. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IotHubDescription]: - """Create or update the metadata of an IoT hub. - - Create or update the metadata of an Iot hub. The usual pattern to modify a property is to - retrieve the IoT hub metadata and security metadata, and then combine them with the modified - values in a new body to update the IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param iot_hub_description: The IoT hub metadata and security metadata. Required. - :type iot_hub_description: IO[bytes] - :param if_match: ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required - to update an existing IoT Hub. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_description: Union[_models.IotHubDescription, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.IotHubDescription]: - """Create or update the metadata of an IoT hub. - - Create or update the metadata of an Iot hub. The usual pattern to modify a property is to - retrieve the IoT hub metadata and security metadata, and then combine them with the modified - values in a new body to update the IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param iot_hub_description: The IoT hub metadata and security metadata. Is either a - IotHubDescription type or a IO[bytes] type. Required. - :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription or IO[bytes] - :param if_match: ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required - to update an existing IoT Hub. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - iot_hub_description=iot_hub_description, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IotHubDescription].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IotHubDescription]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: Union[_models.TagsResource, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(iot_hub_tags, (IOBase, bytes)): - _content = iot_hub_tags - else: - _json = self._serialize.body(iot_hub_tags, "TagsResource") - - _request = build_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: _models.TagsResource, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IotHubDescription]: - """Update an existing IoT Hubs tags. - - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. - - :param resource_group_name: Resource group identifier. Required. - :type resource_group_name: str - :param resource_name: Name of iot hub to update. Required. - :type resource_name: str - :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. - :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IotHubDescription]: - """Update an existing IoT Hubs tags. - - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. - - :param resource_group_name: Resource group identifier. Required. - :type resource_group_name: str - :param resource_name: Name of iot hub to update. Required. - :type resource_name: str - :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. - :type iot_hub_tags: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - resource_name: str, - iot_hub_tags: Union[_models.TagsResource, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.IotHubDescription]: - """Update an existing IoT Hubs tags. - - Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. - - :param resource_group_name: Resource group identifier. Required. - :type resource_group_name: str - :param resource_name: Name of iot hub to update. Required. - :type resource_name: str - :param iot_hub_tags: Updated tag information to set into the iot hub instance. Is either a - TagsResource type or a IO[bytes] type. Required. - :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource or IO[bytes] - :return: An instance of LROPoller that returns either IotHubDescription or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - iot_hub_tags=iot_hub_tags, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IotHubDescription].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IotHubDescription]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204, 404]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> LROPoller[_models.IotHubDescription]: - """Delete an IoT hub. - - Delete an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An instance of LROPoller that returns either IotHubDescription or An instance of - LROPoller that returns either ErrorDetails or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] or - ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.ErrorDetails] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("IotHubDescription", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.IotHubDescription].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IotHubDescription]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IotHubDescription"]: - """Get all the IoT hubs in a subscription. - - Get all the IoT hubs in a subscription. - - :return: An iterator like instance of either IotHubDescription or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescriptionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_subscription_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubDescriptionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IotHubDescription"]: - """Get all the IoT hubs in a resource group. - - Get all the IoT hubs in a resource group. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :return: An iterator like instance of either IotHubDescription or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubDescriptionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubDescriptionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_stats(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.RegistryStatistics: - """Get the statistics from an IoT hub. - - Get the statistics from an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: RegistryStatistics or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.RegistryStatistics - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.RegistryStatistics] = kwargs.pop("cls", None) - - _request = build_get_stats_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("RegistryStatistics", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_valid_skus( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.IotHubSkuDescription"]: - """Get the list of valid SKUs for an IoT hub. - - Get the list of valid SKUs for an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either IotHubSkuDescription or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubSkuDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubSkuDescriptionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_get_valid_skus_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubSkuDescriptionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_event_hub_consumer_groups( - self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, **kwargs: Any - ) -> ItemPaged["_models.EventHubConsumerGroupInfo"]: - """Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an - IoT hub. - - Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an - IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint. Required. - :type event_hub_endpoint_name: str - :return: An iterator like instance of either EventHubConsumerGroupInfo or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EventHubConsumerGroupsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_event_hub_consumer_groups_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("EventHubConsumerGroupsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_event_hub_consumer_group( - self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - - Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to retrieve. Required. - :type name: str - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) - - _request = build_get_event_hub_consumer_group_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("EventHubConsumerGroupInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def create_event_hub_consumer_group( - self, - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - consumer_group_body: _models.EventHubConsumerGroupBodyDescription, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to add. Required. - :type name: str - :param consumer_group_body: The consumer group to add. Required. - :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_event_hub_consumer_group( - self, - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - consumer_group_body: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to add. Required. - :type name: str - :param consumer_group_body: The consumer group to add. Required. - :type consumer_group_body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_event_hub_consumer_group( - self, - resource_group_name: str, - resource_name: str, - event_hub_endpoint_name: str, - name: str, - consumer_group_body: Union[_models.EventHubConsumerGroupBodyDescription, IO[bytes]], - **kwargs: Any - ) -> _models.EventHubConsumerGroupInfo: - """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to add. Required. - :type name: str - :param consumer_group_body: The consumer group to add. Is either a - EventHubConsumerGroupBodyDescription type or a IO[bytes] type. Required. - :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription or - IO[bytes] - :return: EventHubConsumerGroupInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(consumer_group_body, (IOBase, bytes)): - _content = consumer_group_body - else: - _json = self._serialize.body(consumer_group_body, "EventHubConsumerGroupBodyDescription") - - _request = build_create_event_hub_consumer_group_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("EventHubConsumerGroupInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def delete_event_hub_consumer_group( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any - ) -> None: - """Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - - Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param event_hub_endpoint_name: The name of the Event Hub-compatible endpoint in the IoT hub. - Required. - :type event_hub_endpoint_name: str - :param name: The name of the consumer group to delete. Required. - :type name: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_event_hub_consumer_group_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - event_hub_endpoint_name=event_hub_endpoint_name, - name=name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_jobs( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.JobResponse"]: - """Get a list of all the jobs in an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - Get a list of all the jobs in an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either JobResponse or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.JobResponse] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JobResponseListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_jobs_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("JobResponseListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_job(self, resource_group_name: str, resource_name: str, job_id: str, **kwargs: Any) -> _models.JobResponse: - """Get the details of a job from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - Get the details of a job from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param job_id: The job identifier. Required. - :type job_id: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) - - _request = build_get_job_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - job_id=job_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JobResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_quota_metrics( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.IotHubQuotaMetricInfo"]: - """Get the quota metrics for an IoT hub. - - Get the quota metrics for an IoT hub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either IotHubQuotaMetricInfo or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IotHubQuotaMetricInfoListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_get_quota_metrics_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IotHubQuotaMetricInfoListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_endpoint_health( - self, resource_group_name: str, iot_hub_name: str, **kwargs: Any - ) -> ItemPaged["_models.EndpointHealthData"]: - """Get the health for routing endpoints. - - Get the health for routing endpoints. - - :param resource_group_name: Required. - :type resource_group_name: str - :param iot_hub_name: Required. - :type iot_hub_name: str - :return: An iterator like instance of either EndpointHealthData or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.EndpointHealthData] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.EndpointHealthDataListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_get_endpoint_health_request( - resource_group_name=resource_group_name, - iot_hub_name=iot_hub_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("EndpointHealthDataListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @overload - def check_name_availability( - self, operation_inputs: _models.OperationInputs, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IotHubNameAvailabilityInfo: - """Check if an IoT hub name is available. - - Check if an IoT hub name is available. - - :param operation_inputs: Set the name parameter in the OperationInputs structure to the name of - the IoT hub to check. Required. - :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: IotHubNameAvailabilityInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, operation_inputs: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.IotHubNameAvailabilityInfo: - """Check if an IoT hub name is available. - - Check if an IoT hub name is available. - - :param operation_inputs: Set the name parameter in the OperationInputs structure to the name of - the IoT hub to check. Required. - :type operation_inputs: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: IotHubNameAvailabilityInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, operation_inputs: Union[_models.OperationInputs, IO[bytes]], **kwargs: Any - ) -> _models.IotHubNameAvailabilityInfo: - """Check if an IoT hub name is available. - - Check if an IoT hub name is available. - - :param operation_inputs: Set the name parameter in the OperationInputs structure to the name of - the IoT hub to check. Is either a OperationInputs type or a IO[bytes] type. Required. - :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs or IO[bytes] - :return: IotHubNameAvailabilityInfo or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IotHubNameAvailabilityInfo] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(operation_inputs, (IOBase, bytes)): - _content = operation_inputs - else: - _json = self._serialize.body(operation_inputs, "OperationInputs") - - _request = build_check_name_availability_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IotHubNameAvailabilityInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def test_all_routes( - self, - iot_hub_name: str, - resource_group_name: str, - input: _models.TestAllRoutesInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestAllRoutesResult: - """Test all routes. - - Test all routes configured in this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Input for testing all routes. Required. - :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TestAllRoutesResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def test_all_routes( - self, - iot_hub_name: str, - resource_group_name: str, - input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestAllRoutesResult: - """Test all routes. - - Test all routes configured in this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Input for testing all routes. Required. - :type input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TestAllRoutesResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def test_all_routes( - self, - iot_hub_name: str, - resource_group_name: str, - input: Union[_models.TestAllRoutesInput, IO[bytes]], - **kwargs: Any - ) -> _models.TestAllRoutesResult: - """Test all routes. - - Test all routes configured in this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Input for testing all routes. Is either a TestAllRoutesInput type or a IO[bytes] - type. Required. - :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput or IO[bytes] - :return: TestAllRoutesResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TestAllRoutesResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(input, (IOBase, bytes)): - _content = input - else: - _json = self._serialize.body(input, "TestAllRoutesInput") - - _request = build_test_all_routes_request( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TestAllRoutesResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def test_route( - self, - iot_hub_name: str, - resource_group_name: str, - input: _models.TestRouteInput, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestRouteResult: - """Test the new route. - - Test the new route for this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Route that needs to be tested. Required. - :type input: ~azure.mgmt.iothub.models.TestRouteInput - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: TestRouteResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestRouteResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def test_route( - self, - iot_hub_name: str, - resource_group_name: str, - input: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.TestRouteResult: - """Test the new route. - - Test the new route for this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Route that needs to be tested. Required. - :type input: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: TestRouteResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestRouteResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def test_route( - self, - iot_hub_name: str, - resource_group_name: str, - input: Union[_models.TestRouteInput, IO[bytes]], - **kwargs: Any - ) -> _models.TestRouteResult: - """Test the new route. - - Test the new route for this Iot Hub. - - :param iot_hub_name: IotHub to be tested. Required. - :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to. Required. - :type resource_group_name: str - :param input: Route that needs to be tested. Is either a TestRouteInput type or a IO[bytes] - type. Required. - :type input: ~azure.mgmt.iothub.models.TestRouteInput or IO[bytes] - :return: TestRouteResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.TestRouteResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TestRouteResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(input, (IOBase, bytes)): - _content = input - else: - _json = self._serialize.body(input, "TestRouteInput") - - _request = build_test_route_request( - iot_hub_name=iot_hub_name, - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("TestRouteResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_keys( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.SharedAccessSignatureAuthorizationRule"]: - """Get the security metadata for an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - Get the security metadata for an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: An iterator like instance of either SharedAccessSignatureAuthorizationRule or the - result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SharedAccessSignatureAuthorizationRuleListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_keys_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SharedAccessSignatureAuthorizationRuleListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_keys_for_key_name( - self, resource_group_name: str, resource_name: str, key_name: str, **kwargs: Any - ) -> _models.SharedAccessSignatureAuthorizationRule: - """Get a shared access policy by name from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - Get a shared access policy by name from an IoT hub. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param key_name: The name of the shared access policy. Required. - :type key_name: str - :return: SharedAccessSignatureAuthorizationRule or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SharedAccessSignatureAuthorizationRule] = kwargs.pop("cls", None) - - _request = build_get_keys_for_key_name_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - key_name=key_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SharedAccessSignatureAuthorizationRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def export_devices( - self, - resource_group_name: str, - resource_name: str, - export_devices_parameters: _models.ExportDevicesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param export_devices_parameters: The parameters that specify the export devices operation. - Required. - :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def export_devices( - self, - resource_group_name: str, - resource_name: str, - export_devices_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param export_devices_parameters: The parameters that specify the export devices operation. - Required. - :type export_devices_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def export_devices( - self, - resource_group_name: str, - resource_name: str, - export_devices_parameters: Union[_models.ExportDevicesRequest, IO[bytes]], - **kwargs: Any - ) -> _models.JobResponse: - """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Exports all the device identities in the IoT hub identity registry to an Azure Storage blob - container. For more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param export_devices_parameters: The parameters that specify the export devices operation. Is - either a ExportDevicesRequest type or a IO[bytes] type. Required. - :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest or IO[bytes] - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(export_devices_parameters, (IOBase, bytes)): - _content = export_devices_parameters - else: - _json = self._serialize.body(export_devices_parameters, "ExportDevicesRequest") - - _request = build_export_devices_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JobResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def import_devices( - self, - resource_group_name: str, - resource_name: str, - import_devices_parameters: _models.ImportDevicesRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param import_devices_parameters: The parameters that specify the import devices operation. - Required. - :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def import_devices( - self, - resource_group_name: str, - resource_name: str, - import_devices_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.JobResponse: - """Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param import_devices_parameters: The parameters that specify the import devices operation. - Required. - :type import_devices_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def import_devices( - self, - resource_group_name: str, - resource_name: str, - import_devices_parameters: Union[_models.ImportDevicesRequest, IO[bytes]], - **kwargs: Any - ) -> _models.JobResponse: - """Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - Import, update, or delete device identities in the IoT hub identity registry from a blob. For - more information, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param import_devices_parameters: The parameters that specify the import devices operation. Is - either a ImportDevicesRequest type or a IO[bytes] type. Required. - :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest or IO[bytes] - :return: JobResponse or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.JobResponse - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(import_devices_parameters, (IOBase, bytes)): - _content = import_devices_parameters - else: - _json = self._serialize.body(import_devices_parameters, "ImportDevicesRequest") - - _request = build_import_devices_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JobResponse", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py index eecb0a376e5b..e42cc55c9c25 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py @@ -1,43 +1,54 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar +from io import IOBase +import json +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse -from azure.core import PipelineClient +from azure.core import MatchConditions, PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, + ResourceModifiedError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models from .._configuration import IotHubClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer +from .._utils.utils import prep_if_match, prep_if_none_match T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request(**kwargs: Any) -> HttpRequest: +def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -45,7 +56,1175 @@ def build_list_request(**kwargs: Any) -> HttpRequest: accept = _headers.pop("Accept", "application/json") # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.Devices/operations") + _url = "/providers/Microsoft.Devices/operations" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_get_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_update_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_list_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_update_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_delete_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_valid_skus_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_list_jobs_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_job_request( + resource_group_name: str, resource_name: str, job_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "jobId": _SERIALIZER.url("job_id", job_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_quota_metrics_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_endpoint_health_request( # pylint: disable=name-too-long + resource_group_name: str, iot_hub_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routingEndpointsHealth" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_test_all_routes_request( # pylint: disable=name-too-long + iot_hub_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testall" + path_format_arguments = { + "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_test_route_request( # pylint: disable=name-too-long + iot_hub_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testnew" + path_format_arguments = { + "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_list_keys_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_keys_for_key_name_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, key_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "keyName": _SERIALIZER.url("key_name", key_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_export_devices_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_import_devices_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_stats_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_get_event_hub_consumer_group_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_create_event_hub_consumer_group_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_delete_event_hub_consumer_group_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), + "name": _SERIALIZER.url("name", name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_iot_hub_resource_list_event_hub_consumer_groups_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "eventHubEndpointName": _SERIALIZER.url("event_hub_endpoint_name", event_hub_endpoint_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_resource_check_name_availability_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_iot_hub_manual_failover_request( + iot_hub_name: str, resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover" + path_format_arguments = { + "iotHubName": _SERIALIZER.url("iot_hub_name", iot_hub_name, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificates_get_request( + resource_group_name: str, resource_name: str, certificate_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificates_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + certificate_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificates_delete_request( + resource_group_name: str, + resource_name: str, + certificate_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificates_list_by_iot_hub_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificates_generate_verification_code_request( # pylint: disable=name-too-long + resource_group_name: str, + resource_name: str, + certificate_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_certificates_verify_request( + resource_group_name: str, + resource_name: str, + certificate_name: str, + subscription_id: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_link_resources_get_request( + resource_group_name: str, resource_name: str, group_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateLinkResources/{groupId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "groupId": _SERIALIZER.url("group_id", group_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_link_resources_list_request( # pylint: disable=name-too-long + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateLinkResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_resource_provider_common_get_subscription_quota_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/usages" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -63,11 +1242,4828 @@ class Operations: Instead, you should access the following operations through :class:`~azure.mgmt.iothub.IotHubClient`'s - :attr:`operations` attribute. + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """List the operations for the provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.IotHubClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Get private endpoint connection. + + Get private endpoint connection properties. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _update_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(private_endpoint_connection, (IOBase, bytes)): + _content = private_endpoint_connection + else: + _content = json.dumps(private_endpoint_connection, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connections_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. + Required. + :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. + Required. + :type private_endpoint_connection: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. + Required. + :type private_endpoint_connection: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Update private endpoint connection. + + Update the status of a private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The private endpoint connection with updated properties. Is + one of the following types: PrivateEndpointConnection, JSON, IO[bytes] Required. + :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection or JSON + or IO[bytes] + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Delete private endpoint connection. + + Delete private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> List[_models.PrivateEndpointConnection]: + """List private endpoint connections. + + List private endpoint connection properties. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :return: list of PrivateEndpointConnection + :rtype: list[~azure.mgmt.iothub.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(List[_models.PrivateEndpointConnection], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class IotHubResourceOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.IotHubClient`'s + :attr:`iot_hub_resource` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.IotHubDescription: + """Get the non-security related metadata of an IoT hub. + + Get the non-security related metadata of an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: IotHubDescription. The IotHubDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IotHubDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: Union[_models.IotHubDescription, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(iot_hub_description, (IOBase, bytes)): + _content = iot_hub_description + else: + _content = json.dumps(iot_hub_description, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: _models.IotHubDescription, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Required. + :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Required. + :type iot_hub_description: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Required. + :type iot_hub_description: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_description: Union[_models.IotHubDescription, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Create or update the metadata of an IoT hub. + + Create or update the metadata of an Iot hub. The usual pattern to modify a property is to + retrieve the IoT hub metadata and security metadata, and then combine them with the modified + values in a new body to update the IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_description: The IoT hub metadata and security metadata. Is one of the following + types: IotHubDescription, JSON, IO[bytes] Required. + :type iot_hub_description: ~azure.mgmt.iothub.models.IotHubDescription or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + iot_hub_description=iot_hub_description, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IotHubDescription, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IotHubDescription].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IotHubDescription]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: Union[_models.TagsResource, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(iot_hub_tags, (IOBase, bytes)): + _content = iot_hub_tags + else: + _content = json.dumps(iot_hub_tags, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: _models.TagsResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. + :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. + :type iot_hub_tags: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Required. + :type iot_hub_tags: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + resource_name: str, + iot_hub_tags: Union[_models.TagsResource, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Update an existing IoT Hubs tags. + + Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param iot_hub_tags: Updated tag information to set into the iot hub instance. Is one of the + following types: TagsResource, JSON, IO[bytes] Required. + :type iot_hub_tags: ~azure.mgmt.iothub.models.TagsResource or JSON or IO[bytes] + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + iot_hub_tags=iot_hub_tags, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.IotHubDescription, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IotHubDescription].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IotHubDescription]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = None + if response.status_code == 404: + error = _failsafe_deserialize(_models.ErrorDetails, response) + raise ResourceNotFoundError(response=response, model=error, error_format=ARMErrorFormat) + else: + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[_models.IotHubDescription]: + """Delete an IoT hub. + + Delete an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An instance of LROPoller that returns IotHubDescription. The IotHubDescription is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.IotHubDescription] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.IotHubDescription, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.IotHubDescription].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.IotHubDescription]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.IotHubDescription"]: + """Get all the IoT hubs in a resource group. + + Get all the IoT hubs in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of IotHubDescription + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.IotHubDescription"]: + """Get all the IoT hubs in a subscription. + + Get all the IoT hubs in a subscription. + + :return: An iterator like instance of IotHubDescription + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_valid_skus( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.IotHubSkuDescription"]: + """Get the list of valid SKUs for an IoT hub. + + Get the list of valid SKUs for an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of IotHubSkuDescription + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubSkuDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubSkuDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_get_valid_skus_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubSkuDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_jobs( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.JobResponse"]: + """Get a list of all the jobs in an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + Get a list of all the jobs in an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of JobResponse + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.JobResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.JobResponse]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_jobs_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.JobResponse], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_job(self, resource_group_name: str, resource_name: str, job_id: str, **kwargs: Any) -> _models.JobResponse: + """Get the details of a job from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + Get the details of a job from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param job_id: The job identifier. Required. + :type job_id: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_job_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + job_id=job_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.JobResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_quota_metrics( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.IotHubQuotaMetricInfo"]: + """Get the quota metrics for an IoT hub. + + Get the quota metrics for an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of IotHubQuotaMetricInfo + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.IotHubQuotaMetricInfo]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_get_quota_metrics_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.IotHubQuotaMetricInfo], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_endpoint_health( + self, resource_group_name: str, iot_hub_name: str, **kwargs: Any + ) -> ItemPaged["_models.EndpointHealthData"]: + """Get the health for routing endpoints. + + Get the health for routing endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param iot_hub_name: Required. + :type iot_hub_name: str + :return: An iterator like instance of EndpointHealthData + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.EndpointHealthData] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EndpointHealthData]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_get_endpoint_health_request( + resource_group_name=resource_group_name, + iot_hub_name=iot_hub_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EndpointHealthData], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: _models.TestAllRoutesInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Required. + :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Required. + :type input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Required. + :type input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def test_all_routes( + self, + iot_hub_name: str, + resource_group_name: str, + input: Union[_models.TestAllRoutesInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TestAllRoutesResult: + """Test all routes. + + Test all routes configured in this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Input for testing all routes. Is one of the following types: TestAllRoutesInput, + JSON, IO[bytes] Required. + :type input: ~azure.mgmt.iothub.models.TestAllRoutesInput or JSON or IO[bytes] + :return: TestAllRoutesResult. The TestAllRoutesResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestAllRoutesResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TestAllRoutesResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(input, (IOBase, bytes)): + _content = input + else: + _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_test_all_routes_request( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TestAllRoutesResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: _models.TestRouteInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Required. + :type input: ~azure.mgmt.iothub.models.TestRouteInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Required. + :type input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Required. + :type input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def test_route( + self, + iot_hub_name: str, + resource_group_name: str, + input: Union[_models.TestRouteInput, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.TestRouteResult: + """Test the new route. + + Test the new route for this Iot Hub. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param input: Route that needs to be tested. Is one of the following types: TestRouteInput, + JSON, IO[bytes] Required. + :type input: ~azure.mgmt.iothub.models.TestRouteInput or JSON or IO[bytes] + :return: TestRouteResult. The TestRouteResult is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.TestRouteResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TestRouteResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(input, (IOBase, bytes)): + _content = input + else: + _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_test_route_request( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.TestRouteResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_keys( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.SharedAccessSignatureAuthorizationRule"]: + """Get the security metadata for an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + Get the security metadata for an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: An iterator like instance of SharedAccessSignatureAuthorizationRule + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SharedAccessSignatureAuthorizationRule]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_keys_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SharedAccessSignatureAuthorizationRule], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_keys_for_key_name( + self, resource_group_name: str, resource_name: str, key_name: str, **kwargs: Any + ) -> _models.SharedAccessSignatureAuthorizationRule: + """Get a shared access policy by name from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + Get a shared access policy by name from an IoT hub. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param key_name: The name of the shared access policy. Required. + :type key_name: str + :return: SharedAccessSignatureAuthorizationRule. The SharedAccessSignatureAuthorizationRule is + compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SharedAccessSignatureAuthorizationRule] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_keys_for_key_name_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + key_name=key_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SharedAccessSignatureAuthorizationRule, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: _models.ExportDevicesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. + Required. + :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. + Required. + :type export_devices_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. + Required. + :type export_devices_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def export_devices( + self, + resource_group_name: str, + resource_name: str, + export_devices_parameters: Union[_models.ExportDevicesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.JobResponse: + """Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Exports all the device identities in the IoT hub identity registry to an Azure Storage blob + container. For more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param export_devices_parameters: The parameters that specify the export devices operation. Is + one of the following types: ExportDevicesRequest, JSON, IO[bytes] Required. + :type export_devices_parameters: ~azure.mgmt.iothub.models.ExportDevicesRequest or JSON or + IO[bytes] + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(export_devices_parameters, (IOBase, bytes)): + _content = export_devices_parameters + else: + _content = json.dumps(export_devices_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_export_devices_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.JobResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: _models.ImportDevicesRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. + Required. + :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. + Required. + :type import_devices_parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. + Required. + :type import_devices_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def import_devices( + self, + resource_group_name: str, + resource_name: str, + import_devices_parameters: Union[_models.ImportDevicesRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.JobResponse: + """Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + Import, update, or delete device identities in the IoT hub identity registry from a blob. For + more information, see: + `https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities + `_. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param import_devices_parameters: The parameters that specify the import devices operation. Is + one of the following types: ImportDevicesRequest, JSON, IO[bytes] Required. + :type import_devices_parameters: ~azure.mgmt.iothub.models.ImportDevicesRequest or JSON or + IO[bytes] + :return: JobResponse. The JobResponse is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.JobResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.JobResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(import_devices_parameters, (IOBase, bytes)): + _content = import_devices_parameters + else: + _content = json.dumps(import_devices_parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_import_devices_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.JobResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_stats(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.RegistryStatistics: + """Get the statistics from an IoT hub. + + Get the statistics from an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: Required. + :type resource_name: str + :return: RegistryStatistics. The RegistryStatistics is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.RegistryStatistics + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RegistryStatistics] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_stats_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RegistryStatistics, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def get_event_hub_consumer_group( + self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. + + Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_get_event_hub_consumer_group_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EventHubConsumerGroupInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: _models.EventHubConsumerGroupBodyDescription, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Required. + :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Required. + :type consumer_group_body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Required. + :type consumer_group_body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_event_hub_consumer_group( + self, + resource_group_name: str, + resource_name: str, + event_hub_endpoint_name: str, + name: str, + consumer_group_body: Union[_models.EventHubConsumerGroupBodyDescription, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.EventHubConsumerGroupInfo: + """Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + Add a consumer group to an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :param consumer_group_body: The consumer group to add. Is one of the following types: + EventHubConsumerGroupBodyDescription, JSON, IO[bytes] Required. + :type consumer_group_body: ~azure.mgmt.iothub.models.EventHubConsumerGroupBodyDescription or + JSON or IO[bytes] + :return: EventHubConsumerGroupInfo. The EventHubConsumerGroupInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.EventHubConsumerGroupInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.EventHubConsumerGroupInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(consumer_group_body, (IOBase, bytes)): + _content = consumer_group_body + else: + _content = json.dumps(consumer_group_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_create_event_hub_consumer_group_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + name=name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.EventHubConsumerGroupInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_event_hub_consumer_group( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any + ) -> None: + """Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. + + Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :param name: The name of the consumer group to retrieve. Required. + :type name: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_iot_hub_resource_delete_event_hub_consumer_group_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + name=name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_event_hub_consumer_groups( + self, resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, **kwargs: Any + ) -> ItemPaged["_models.EventHubConsumerGroupInfo"]: + """Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an + IoT hub. + + Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an + IoT hub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param event_hub_endpoint_name: The name of the EventHubEndpoint. Required. + :type event_hub_endpoint_name: str + :return: An iterator like instance of EventHubConsumerGroupInfo + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.EventHubConsumerGroupInfo]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_iot_hub_resource_list_event_hub_consumer_groups_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + event_hub_endpoint_name=event_hub_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.EventHubConsumerGroupInfo], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, operation_inputs: _models.OperationInputs, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Required. + :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, operation_inputs: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Required. + :type operation_inputs: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, operation_inputs: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Required. + :type operation_inputs: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, operation_inputs: Union[_models.OperationInputs, JSON, IO[bytes]], **kwargs: Any + ) -> _models.IotHubNameAvailabilityInfo: + """Check if an IoT hub name is available. + + Check if an IoT hub name is available. + + :param operation_inputs: The request body. Is one of the following types: OperationInputs, + JSON, IO[bytes] Required. + :type operation_inputs: ~azure.mgmt.iothub.models.OperationInputs or JSON or IO[bytes] + :return: IotHubNameAvailabilityInfo. The IotHubNameAvailabilityInfo is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.IotHubNameAvailabilityInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.IotHubNameAvailabilityInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(operation_inputs, (IOBase, bytes)): + _content = operation_inputs + else: + _content = json.dumps(operation_inputs, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_resource_check_name_availability_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.IotHubNameAvailabilityInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class IotHubOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.IotHubClient`'s + :attr:`iot_hub` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + def _manual_failover_initial( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: Union[_models.FailoverInput, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(failover_input, (IOBase, bytes)): + _content = failover_input + else: + _content = json.dumps(failover_input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_iot_hub_manual_failover_request( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: _models.FailoverInput, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Required. + :type failover_input: ~azure.mgmt.iothub.models.FailoverInput + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Required. + :type failover_input: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Required. + :type failover_input: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_manual_failover( + self, + iot_hub_name: str, + resource_group_name: str, + failover_input: Union[_models.FailoverInput, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Manually initiate a failover for the IoT Hub to its secondary region. + + Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see + `https://aka.ms/manualfailover `_. + + :param iot_hub_name: Required. + :type iot_hub_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param failover_input: Region to failover to. Must be the Azure paired region. Get the value + from the secondary location in the locations property. To learn more, see + `https://aka.ms/manualfailover/region `_. Is one of the + following types: FailoverInput, JSON, IO[bytes] Required. + :type failover_input: ~azure.mgmt.iothub.models.FailoverInput or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._manual_failover_initial( + iot_hub_name=iot_hub_name, + resource_group_name=resource_group_name, + failover_input=failover_input, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class CertificatesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.IotHubClient`'s + :attr:`certificates` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, certificate_name: str, **kwargs: Any + ) -> _models.CertificateDescription: + """Get the certificate. + + Returns the certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) + + _request = build_certificates_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: _models.CertificateDescription, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Required. + :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Required. + :type certificate_description: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Required. + :type certificate_description: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_description: Union[_models.CertificateDescription, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> _models.CertificateDescription: + """Upload the certificate to the IoT hub. + + Adds new or replaces existing certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_description: The certificate body. Is one of the following types: + CertificateDescription, JSON, IO[bytes] Required. + :type certificate_description: ~azure.mgmt.iothub.models.CertificateDescription or JSON or + IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(certificate_description, (IOBase, bytes)): + _content = certificate_description + else: + _content = json.dumps(certificate_description, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_certificates_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> None: + """Delete an X509 certificate. + + Deletes an existing X509 certificate or does nothing if it does not exist. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_certificates_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_iot_hub( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.CertificateListDescription: + """Get the certificate list. + + Returns the list of certificates. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :return: CertificateListDescription. The CertificateListDescription is compatible with + MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateListDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateListDescription] = kwargs.pop("cls", None) + + _request = build_certificates_list_by_iot_hub_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateListDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def generate_verification_code( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.CertificateWithNonceDescription: + """Generate verification code for proof of possession flow. + + Generates verification code for proof of possession flow. The verification code will be used to + generate a leaf certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateWithNonceDescription. The CertificateWithNonceDescription is compatible + with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateWithNonceDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CertificateWithNonceDescription] = kwargs.pop("cls", None) + + _request = build_certificates_generate_verification_code_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateWithNonceDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: _models.CertificateVerificationDescription, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Required. + :type certificate_verification_body: + ~azure.mgmt.iothub.models.CertificateVerificationDescription + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: JSON, + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Required. + :type certificate_verification_body: JSON + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: IO[bytes], + *, + etag: str, + match_condition: MatchConditions, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Required. + :type certificate_verification_body: IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def verify( + self, + resource_group_name: str, + resource_name: str, + certificate_name: str, + certificate_verification_body: Union[_models.CertificateVerificationDescription, JSON, IO[bytes]], + *, + etag: str, + match_condition: MatchConditions, + **kwargs: Any + ) -> _models.CertificateDescription: + """Verify certificate's private key possession. + + Verifies the certificate's private key possession by providing the leaf cert issued by the + verifying pre uploaded certificate. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT hub. Required. + :type resource_name: str + :param certificate_name: The name of the certificate. Required. + :type certificate_name: str + :param certificate_verification_body: The name of the certificate. Is one of the following + types: CertificateVerificationDescription, JSON, IO[bytes] Required. + :type certificate_verification_body: + ~azure.mgmt.iothub.models.CertificateVerificationDescription or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Required. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Required. + :paramtype match_condition: ~azure.core.MatchConditions + :return: CertificateDescription. The CertificateDescription is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.CertificateDescription + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CertificateDescription] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(certificate_verification_body, (IOBase, bytes)): + _content = certificate_verification_body + else: + _content = json.dumps(certificate_verification_body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_certificates_verify_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + certificate_name=certificate_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CertificateDescription, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.IotHubClient`'s + :attr:`private_link_resources` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") @@ -76,19 +6072,97 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: - """Lists all of the available IoT Hub REST API operations. + def get( + self, resource_group_name: str, resource_name: str, group_id: str, **kwargs: Any + ) -> _models.GroupIdInformation: + """Get the specified private link resource. - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.iothub.models.Operation] + Get the specified private link resource for the given IotHub. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :param group_id: The name of the private link resource. Required. + :type group_id: str + :return: GroupIdInformation. The GroupIdInformation is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.GroupIdInformation :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.GroupIdInformation] = kwargs.pop("cls", None) + + _request = build_private_link_resources_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + group_id=group_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.GroupIdInformation, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + @distributed_trace + def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.PrivateLinkResources: + """List private link resources. + + List private link resources for the given IotHub. + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the IoT Hub. Required. + :type resource_name: str + :return: PrivateLinkResources. The PrivateLinkResources is compatible with MutableMapping + :rtype: ~azure.mgmt.iothub.models.PrivateLinkResources + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -97,54 +6171,135 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - _request = build_list_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) + cls: ClsType[_models.PrivateLinkResources] = kwargs.pop("cls", None) - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + _request = build_private_link_resources_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResources, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore + + +class ResourceProviderCommonOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.iothub.IotHubClient`'s + :attr:`resource_provider_common` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get_subscription_quota(self, **kwargs: Any) -> _models.UserSubscriptionQuotaListResult: + """Get the number of iot hubs in the subscription. + + Get the number of free and paid iot hubs in the subscription. + + :return: UserSubscriptionQuotaListResult. The UserSubscriptionQuotaListResult is compatible + with MutableMapping + :rtype: ~azure.mgmt.iothub.models.UserSubscriptionQuotaListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.UserSubscriptionQuotaListResult] = kwargs.pop("cls", None) + + _request = build_resource_provider_common_get_subscription_quota_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorDetails, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.UserSubscriptionQuotaListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_endpoint_connections_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index f6bbcb350220..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,670 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import IotHubClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.IotHubClient`'s - :attr:`private_endpoint_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> List[_models.PrivateEndpointConnection]: - """List private endpoint connections. - - List private endpoint connection properties. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: list of PrivateEndpointConnection or the result of cls(response) - :rtype: list[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) - - _request = build_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("[PrivateEndpointConnection]", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Get private endpoint connection. - - Get private endpoint connection properties. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _update_initial( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(private_endpoint_connection, (IOBase, bytes)): - _content = private_endpoint_connection - else: - _json = self._serialize.body(private_endpoint_connection, "PrivateEndpointConnection") - - _request = build_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: _models.PrivateEndpointConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Update private endpoint connection. - - Update the status of a private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The private endpoint connection with updated properties. - Required. - :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Update private endpoint connection. - - Update the status of a private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The private endpoint connection with updated properties. - Required. - :type private_endpoint_connection: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Update private endpoint connection. - - Update the status of a private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The private endpoint connection with updated properties. Is - either a PrivateEndpointConnection type or a IO[bytes] type. Required. - :type private_endpoint_connection: ~azure.mgmt.iothub.models.PrivateEndpointConnection or - IO[bytes] - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint_connection=private_endpoint_connection, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Delete private endpoint connection. - - Delete private endpoint connection with the specified name. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.iothub.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_link_resources_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_link_resources_operations.py deleted file mode 100644 index c1a7079b3e8a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,238 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import IotHubClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateLinkResources", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, resource_name: str, group_id: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/iotHubs/{resourceName}/privateLinkResources/{groupId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "groupId": _SERIALIZER.url("group_id", group_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class PrivateLinkResourcesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.IotHubClient`'s - :attr:`private_link_resources` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.PrivateLinkResources: - """List private link resources. - - List private link resources for the given IotHub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :return: PrivateLinkResources or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.PrivateLinkResources - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResources] = kwargs.pop("cls", None) - - _request = build_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResources", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, group_id: str, **kwargs: Any - ) -> _models.GroupIdInformation: - """Get the specified private link resource. - - Get the specified private link resource for the given IotHub. - - :param resource_group_name: The name of the resource group that contains the IoT hub. Required. - :type resource_group_name: str - :param resource_name: The name of the IoT hub. Required. - :type resource_name: str - :param group_id: The name of the private link resource. Required. - :type group_id: str - :return: GroupIdInformation or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.GroupIdInformation - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GroupIdInformation] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - group_id=group_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GroupIdInformation", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py deleted file mode 100644 index 3979f4eb2a0e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import IotHubClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_subscription_quota_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/usages") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ResourceProviderCommonOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.iothub.IotHubClient`'s - :attr:`resource_provider_common` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: IotHubClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get_subscription_quota(self, **kwargs: Any) -> _models.UserSubscriptionQuotaListResult: - """Get the number of iot hubs in the subscription. - - Get the number of free and paid iot hubs in the subscription. - - :return: UserSubscriptionQuotaListResult or the result of cls(response) - :rtype: ~azure.mgmt.iothub.models.UserSubscriptionQuotaListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.UserSubscriptionQuotaListResult] = kwargs.pop("cls", None) - - _request = build_get_subscription_quota_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorDetails, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("UserSubscriptionQuotaListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/code_report_swagger.json b/sdk/iothub/azure-mgmt-iothub/code_report_swagger.json new file mode 100644 index 000000000000..a9c4a6b546cf --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/code_report_swagger.json @@ -0,0 +1,16690 @@ +{ + "azure.mgmt.iothub": { + "class_nodes": { + "IotHubClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "iot_hub_resource": { + "attr_type": "IotHubResourceOperations" + }, + "resource_provider_common": { + "attr_type": "ResourceProviderCommonOperations" + }, + "certificates": { + "attr_type": "CertificatesOperations" + }, + "iot_hub": { + "attr_type": "IotHubOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.operations": { + "class_nodes": { + "CertificatesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "CertificateDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "generate_verification_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_iot_hub": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "verify": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "CertificateVerificationDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_manual_failover": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "FailoverInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IotHubDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "TagsResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "OperationInputs", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "create_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "EventHubConsumerGroupBodyDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "export_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "ExportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_endpoint_health": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_job": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "job_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_keys_for_key_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_quota_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_stats": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_valid_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "import_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "ImportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_event_hub_consumer_groups": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_jobs": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "test_all_routes": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestAllRoutesInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "test_route": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestRouteInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ResourceProviderCommonOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_subscription_quota": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.models": { + "class_nodes": { + "AccessRights": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVICE_CONNECT": "DEVICE_CONNECT", + "REGISTRY_READ": "REGISTRY_READ", + "REGISTRY_READ_DEVICE_CONNECT": "REGISTRY_READ_DEVICE_CONNECT", + "REGISTRY_READ_REGISTRY_WRITE": "REGISTRY_READ_REGISTRY_WRITE", + "REGISTRY_READ_REGISTRY_WRITE_DEVICE_CONNECT": "REGISTRY_READ_REGISTRY_WRITE_DEVICE_CONNECT", + "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT": "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT", + "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT": "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT", + "REGISTRY_READ_SERVICE_CONNECT": "REGISTRY_READ_SERVICE_CONNECT", + "REGISTRY_READ_SERVICE_CONNECT_DEVICE_CONNECT": "REGISTRY_READ_SERVICE_CONNECT_DEVICE_CONNECT", + "REGISTRY_WRITE": "REGISTRY_WRITE", + "REGISTRY_WRITE_DEVICE_CONNECT": "REGISTRY_WRITE_DEVICE_CONNECT", + "REGISTRY_WRITE_SERVICE_CONNECT": "REGISTRY_WRITE_SERVICE_CONNECT", + "REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT": "REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT", + "SERVICE_CONNECT": "SERVICE_CONNECT", + "SERVICE_CONNECT_DEVICE_CONNECT": "SERVICE_CONNECT_DEVICE_CONNECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ArmIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "tenant_id": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "user_assigned_identities": { + "attr_type": "user_assigned_identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ArmUserIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "client_id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AuthenticationType": { + "type": "Enum", + "methods": {}, + "properties": { + "IDENTITY_BASED": "IDENTITY_BASED", + "KEY_BASED": "KEY_BASED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Capabilities": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVICE_MANAGEMENT": "DEVICE_MANAGEMENT", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateBodyDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "is_verified": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "certificate": { + "attr_type": "certificate" + }, + "is_verified": { + "attr_type": "is_verified" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": { + "attr_type": "properties" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "etag": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateListDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "is_verified": { + "default": "none", + "param_type": "keyword_only" + }, + "certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "policy_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": { + "attr_type": null + }, + "expiry": { + "attr_type": null + }, + "thumbprint": { + "attr_type": null + }, + "is_verified": { + "attr_type": "is_verified" + }, + "created": { + "attr_type": null + }, + "updated": { + "attr_type": null + }, + "certificate": { + "attr_type": "certificate" + }, + "policy_resource_id": { + "attr_type": "policy_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificatePropertiesWithNonce": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": { + "attr_type": null + }, + "expiry": { + "attr_type": null + }, + "thumbprint": { + "attr_type": null + }, + "is_verified": { + "attr_type": null + }, + "created": { + "attr_type": null + }, + "updated": { + "attr_type": null + }, + "verification_code": { + "attr_type": null + }, + "certificate": { + "attr_type": null + }, + "policy_resource_id": { + "attr_type": "policy_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateVerificationDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "certificate": { + "attr_type": "certificate" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CertificateWithNonceDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": { + "attr_type": "properties" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "etag": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CloudToDeviceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "max_delivery_count": { + "default": "none", + "param_type": "keyword_only" + }, + "default_ttl_as_iso8601": { + "default": "none", + "param_type": "keyword_only" + }, + "feedback": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "max_delivery_count": { + "attr_type": "max_delivery_count" + }, + "default_ttl_as_iso8601": { + "attr_type": "default_ttl_as_iso8601" + }, + "feedback": { + "attr_type": "feedback" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DefaultAction": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "DENY": "DENY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeviceRegistry": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "namespace_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "identity_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "namespace_resource_id": { + "attr_type": "namespace_resource_id" + }, + "identity_resource_id": { + "attr_type": "identity_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EncryptionPropertiesDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_source": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_source": { + "attr_type": "key_source" + }, + "key_vault_properties": { + "attr_type": "key_vault_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointHealthData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_id": { + "default": "none", + "param_type": "keyword_only" + }, + "health_status": { + "default": "none", + "param_type": "keyword_only" + }, + "last_known_error": { + "default": "none", + "param_type": "keyword_only" + }, + "last_known_error_time": { + "default": "none", + "param_type": "keyword_only" + }, + "last_successful_send_attempt_time": { + "default": "none", + "param_type": "keyword_only" + }, + "last_send_attempt_time": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "endpoint_id": { + "attr_type": "endpoint_id" + }, + "health_status": { + "attr_type": "health_status" + }, + "last_known_error": { + "attr_type": "last_known_error" + }, + "last_known_error_time": { + "attr_type": "last_known_error_time" + }, + "last_successful_send_attempt_time": { + "attr_type": "last_successful_send_attempt_time" + }, + "last_send_attempt_time": { + "attr_type": "last_send_attempt_time" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointHealthDataListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointHealthStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DEAD": "DEAD", + "DEGRADED": "DEGRADED", + "HEALTHY": "HEALTHY", + "UNHEALTHY": "UNHEALTHY", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EnrichmentProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "keyword_only" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "endpoint_names": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key": { + "attr_type": "key" + }, + "value": { + "attr_type": "value" + }, + "endpoint_names": { + "attr_type": "endpoint_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "http_status_code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventHubConsumerGroupBodyDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventHubConsumerGroupInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": { + "attr_type": "properties" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "etag": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventHubConsumerGroupName": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventHubConsumerGroupsListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventHubProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "retention_time_in_days": { + "default": "none", + "param_type": "keyword_only" + }, + "partition_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "retention_time_in_days": { + "attr_type": "retention_time_in_days" + }, + "partition_count": { + "attr_type": "partition_count" + }, + "partition_ids": { + "attr_type": null + }, + "path": { + "attr_type": null + }, + "endpoint": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ExportDevicesRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_blob_container_uri": { + "default": null, + "param_type": "keyword_only" + }, + "exclude_keys": { + "default": null, + "param_type": "keyword_only" + }, + "export_blob_name": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "include_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "configurations_blob_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "export_blob_container_uri": { + "attr_type": "export_blob_container_uri" + }, + "exclude_keys": { + "attr_type": "exclude_keys" + }, + "export_blob_name": { + "attr_type": "export_blob_name" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "include_configurations": { + "attr_type": "include_configurations" + }, + "configurations_blob_name": { + "attr_type": "configurations_blob_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FailoverInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_region": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "failover_region": { + "attr_type": "failover_region" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FallbackRouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "source": { + "default": null, + "param_type": "keyword_only" + }, + "endpoint_names": { + "default": null, + "param_type": "keyword_only" + }, + "is_enabled": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "source": { + "attr_type": "source" + }, + "condition": { + "attr_type": "condition" + }, + "endpoint_names": { + "attr_type": "endpoint_names" + }, + "is_enabled": { + "attr_type": "is_enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FeedbackProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "lock_duration_as_iso8601": { + "default": "none", + "param_type": "keyword_only" + }, + "ttl_as_iso8601": { + "default": "none", + "param_type": "keyword_only" + }, + "max_delivery_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "lock_duration_as_iso8601": { + "attr_type": "lock_duration_as_iso8601" + }, + "ttl_as_iso8601": { + "attr_type": "ttl_as_iso8601" + }, + "max_delivery_count": { + "attr_type": "max_delivery_count" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GroupIdInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "GroupIdInformationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": "none", + "param_type": "keyword_only" + }, + "required_members": { + "default": "none", + "param_type": "keyword_only" + }, + "required_zone_names": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "group_id": { + "attr_type": "group_id" + }, + "required_members": { + "attr_type": "required_members" + }, + "required_zone_names": { + "attr_type": "required_zone_names" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ImportDevicesRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input_blob_container_uri": { + "default": null, + "param_type": "keyword_only" + }, + "output_blob_container_uri": { + "default": null, + "param_type": "keyword_only" + }, + "input_blob_name": { + "default": "none", + "param_type": "keyword_only" + }, + "output_blob_name": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "include_configurations": { + "default": "none", + "param_type": "keyword_only" + }, + "configurations_blob_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "input_blob_container_uri": { + "attr_type": "input_blob_container_uri" + }, + "output_blob_container_uri": { + "attr_type": "output_blob_container_uri" + }, + "input_blob_name": { + "attr_type": "input_blob_name" + }, + "output_blob_name": { + "attr_type": "output_blob_name" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "include_configurations": { + "attr_type": "include_configurations" + }, + "configurations_blob_name": { + "attr_type": "configurations_blob_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": { + "attr_type": null + }, + "maximum": { + "attr_type": null + }, + "default": { + "attr_type": null + }, + "scale_type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "etag": { + "attr_type": "etag" + }, + "properties": { + "attr_type": "properties" + }, + "sku": { + "attr_type": "sku" + }, + "identity": { + "attr_type": "identity" + }, + "system_data": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubDescriptionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubLocationDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "role": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "role": { + "attr_type": "role" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubNameAvailabilityInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name_available": { + "attr_type": null + }, + "reason": { + "attr_type": null + }, + "message": { + "attr_type": "message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubNameUnavailabilityReason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_policies": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_local_auth": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_device_sas": { + "default": "none", + "param_type": "keyword_only" + }, + "disable_module_sas": { + "default": "none", + "param_type": "keyword_only" + }, + "restrict_outbound_network_access": { + "default": "none", + "param_type": "keyword_only" + }, + "allowed_fqdn_list": { + "default": "none", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_filter_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "network_rule_sets": { + "default": "none", + "param_type": "keyword_only" + }, + "min_tls_version": { + "default": "none", + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "default": "none", + "param_type": "keyword_only" + }, + "event_hub_endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "routing": { + "default": "none", + "param_type": "keyword_only" + }, + "storage_endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "messaging_endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_file_upload_notifications": { + "default": "none", + "param_type": "keyword_only" + }, + "cloud_to_device": { + "default": "none", + "param_type": "keyword_only" + }, + "comments": { + "default": "none", + "param_type": "keyword_only" + }, + "device_streams": { + "default": "none", + "param_type": "keyword_only" + }, + "features": { + "default": "none", + "param_type": "keyword_only" + }, + "encryption": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_data_residency": { + "default": "none", + "param_type": "keyword_only" + }, + "root_certificate": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_version": { + "default": "none", + "param_type": "keyword_only" + }, + "device_registry": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_policies": { + "attr_type": "authorization_policies" + }, + "disable_local_auth": { + "attr_type": "disable_local_auth" + }, + "disable_device_sas": { + "attr_type": "disable_device_sas" + }, + "disable_module_sas": { + "attr_type": "disable_module_sas" + }, + "restrict_outbound_network_access": { + "attr_type": "restrict_outbound_network_access" + }, + "allowed_fqdn_list": { + "attr_type": "allowed_fqdn_list" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "ip_filter_rules": { + "attr_type": "ip_filter_rules" + }, + "network_rule_sets": { + "attr_type": "network_rule_sets" + }, + "min_tls_version": { + "attr_type": "min_tls_version" + }, + "private_endpoint_connections": { + "attr_type": "private_endpoint_connections" + }, + "provisioning_state": { + "attr_type": null + }, + "state": { + "attr_type": null + }, + "host_name": { + "attr_type": null + }, + "event_hub_endpoints": { + "attr_type": "event_hub_endpoints" + }, + "routing": { + "attr_type": "routing" + }, + "storage_endpoints": { + "attr_type": "storage_endpoints" + }, + "messaging_endpoints": { + "attr_type": "messaging_endpoints" + }, + "enable_file_upload_notifications": { + "attr_type": "enable_file_upload_notifications" + }, + "cloud_to_device": { + "attr_type": "cloud_to_device" + }, + "comments": { + "attr_type": "comments" + }, + "device_streams": { + "attr_type": "device_streams" + }, + "features": { + "attr_type": "features" + }, + "encryption": { + "attr_type": "encryption" + }, + "locations": { + "attr_type": null + }, + "enable_data_residency": { + "attr_type": "enable_data_residency" + }, + "root_certificate": { + "attr_type": "root_certificate" + }, + "ip_version": { + "attr_type": "ip_version" + }, + "device_registry": { + "attr_type": "device_registry" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubPropertiesDeviceStreams": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "streaming_endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "streaming_endpoints": { + "attr_type": "streaming_endpoints" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubQuotaMetricInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "current_value": { + "attr_type": null + }, + "max_value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubQuotaMetricInfoListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubReplicaRoleType": { + "type": "Enum", + "methods": {}, + "properties": { + "PRIMARY": "PRIMARY", + "SECONDARY": "SECONDARY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubSku": { + "type": "Enum", + "methods": {}, + "properties": { + "B1": "B1", + "B2": "B2", + "B3": "B3", + "F1": "F1", + "GEN2": "GEN2", + "S1": "S1", + "S2": "S2", + "S3": "S3", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubSkuDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": null + }, + "sku": { + "attr_type": "sku" + }, + "capacity": { + "attr_type": "capacity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubSkuDescriptionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubSkuInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "tier": { + "attr_type": null + }, + "capacity": { + "attr_type": "capacity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubSkuTier": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "FREE": "FREE", + "GENERATION2": "GENERATION2", + "STANDARD": "STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IpFilterActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCEPT": "ACCEPT", + "REJECT": "REJECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IpFilterRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter_name": { + "default": null, + "param_type": "keyword_only" + }, + "action": { + "default": null, + "param_type": "keyword_only" + }, + "ip_mask": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "filter_name": { + "attr_type": "filter_name" + }, + "action": { + "attr_type": "action" + }, + "ip_mask": { + "attr_type": "ip_mask" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IpVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "IPV4": "IPV4", + "IPV4_IPV6": "IPV4_IPV6", + "IPV6": "IPV6", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "JobResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "job_id": { + "attr_type": null + }, + "start_time_utc": { + "attr_type": null + }, + "end_time_utc": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "status": { + "attr_type": null + }, + "failure_reason": { + "attr_type": null + }, + "status_message": { + "attr_type": null + }, + "parent_job_id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "JobResponseListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "JobStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "CANCELLED": "CANCELLED", + "COMPLETED": "COMPLETED", + "ENQUEUED": "ENQUEUED", + "FAILED": "FAILED", + "RUNNING": "RUNNING", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "JobType": { + "type": "Enum", + "methods": {}, + "properties": { + "BACKUP": "BACKUP", + "EXPORT": "EXPORT", + "FACTORY_RESET_DEVICE": "FACTORY_RESET_DEVICE", + "FIRMWARE_UPDATE": "FIRMWARE_UPDATE", + "IMPORT": "IMPORT", + "READ_DEVICE_PROPERTIES": "READ_DEVICE_PROPERTIES", + "REBOOT_DEVICE": "REBOOT_DEVICE", + "UNKNOWN": "UNKNOWN", + "UPDATE_DEVICE_CONFIGURATION": "UPDATE_DEVICE_CONFIGURATION", + "WRITE_DEVICE_PROPERTIES": "WRITE_DEVICE_PROPERTIES", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultKeyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_identifier": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_identifier": { + "attr_type": "key_identifier" + }, + "identity": { + "attr_type": "identity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "user_assigned_identity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "user_assigned_identity": { + "attr_type": "user_assigned_identity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MatchedRoute": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MessagingEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "lock_duration_as_iso8601": { + "default": "none", + "param_type": "keyword_only" + }, + "ttl_as_iso8601": { + "default": "none", + "param_type": "keyword_only" + }, + "max_delivery_count": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "lock_duration_as_iso8601": { + "attr_type": "lock_duration_as_iso8601" + }, + "ttl_as_iso8601": { + "attr_type": "ttl_as_iso8601" + }, + "max_delivery_count": { + "attr_type": "max_delivery_count" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Name": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "localized_value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "localized_value": { + "attr_type": "localized_value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkRuleIPAction": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkRuleSetIpRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "filter_name": { + "default": null, + "param_type": "keyword_only" + }, + "ip_mask": { + "default": null, + "param_type": "keyword_only" + }, + "action": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "filter_name": { + "attr_type": "filter_name" + }, + "action": { + "attr_type": "action" + }, + "ip_mask": { + "attr_type": "ip_mask" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkRuleSetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "apply_to_built_in_event_hub_endpoint": { + "default": null, + "param_type": "keyword_only" + }, + "ip_rules": { + "default": null, + "param_type": "keyword_only" + }, + "default_action": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "default_action": { + "attr_type": "default_action" + }, + "apply_to_built_in_event_hub_endpoint": { + "attr_type": "apply_to_built_in_event_hub_endpoint" + }, + "ip_rules": { + "attr_type": "ip_rules" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "display": { + "attr_type": "display" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provider": { + "attr_type": null + }, + "resource": { + "attr_type": null + }, + "operation": { + "attr_type": null + }, + "description": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationInputs": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "private_endpoint": { + "attr_type": "private_endpoint" + }, + "private_link_service_connection_state": { + "attr_type": "private_link_service_connection_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkResources": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkServiceConnectionState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": null, + "param_type": "keyword_only" + }, + "description": { + "default": null, + "param_type": "keyword_only" + }, + "actions_required": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "description": { + "attr_type": "description" + }, + "actions_required": { + "attr_type": "actions_required" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkServiceConnectionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "DISCONNECTED": "DISCONNECTED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PublicNetworkAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RegistryStatistics": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "total_device_count": { + "attr_type": null + }, + "enabled_device_count": { + "attr_type": null + }, + "disabled_device_count": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RootCertificateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_root_certificate_v2": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enable_root_certificate_v2": { + "attr_type": "enable_root_certificate_v2" + }, + "last_updated_time_utc": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteCompilationError": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "severity": { + "default": "none", + "param_type": "keyword_only" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "message": { + "attr_type": "message" + }, + "severity": { + "attr_type": "severity" + }, + "location": { + "attr_type": "location" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteErrorPosition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "line": { + "default": "none", + "param_type": "keyword_only" + }, + "column": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "line": { + "attr_type": "line" + }, + "column": { + "attr_type": "column" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteErrorRange": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start": { + "default": "none", + "param_type": "keyword_only" + }, + "end": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "start": { + "attr_type": "start" + }, + "end": { + "attr_type": "end" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RouteErrorSeverity": { + "type": "Enum", + "methods": {}, + "properties": { + "ERROR": "ERROR", + "WARNING": "WARNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "source": { + "default": null, + "param_type": "keyword_only" + }, + "endpoint_names": { + "default": null, + "param_type": "keyword_only" + }, + "is_enabled": { + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "source": { + "attr_type": "source" + }, + "condition": { + "attr_type": "condition" + }, + "endpoint_names": { + "attr_type": "endpoint_names" + }, + "is_enabled": { + "attr_type": "is_enabled" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingCosmosDBSqlApiProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "endpoint_uri": { + "default": null, + "param_type": "keyword_only" + }, + "database_name": { + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_group": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "partition_key_name": { + "default": "none", + "param_type": "keyword_only" + }, + "partition_key_template": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "id": { + "attr_type": null + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "resource_group": { + "attr_type": "resource_group" + }, + "endpoint_uri": { + "attr_type": "endpoint_uri" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "database_name": { + "attr_type": "database_name" + }, + "container_name": { + "attr_type": "container_name" + }, + "partition_key_name": { + "attr_type": "partition_key_name" + }, + "partition_key_template": { + "attr_type": "partition_key_template" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingEndpoints": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "service_bus_queues": { + "default": "none", + "param_type": "keyword_only" + }, + "service_bus_topics": { + "default": "none", + "param_type": "keyword_only" + }, + "event_hubs": { + "default": "none", + "param_type": "keyword_only" + }, + "storage_containers": { + "default": "none", + "param_type": "keyword_only" + }, + "cosmos_db_sql_containers": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "service_bus_queues": { + "attr_type": "service_bus_queues" + }, + "service_bus_topics": { + "attr_type": "service_bus_topics" + }, + "event_hubs": { + "attr_type": "event_hubs" + }, + "storage_containers": { + "attr_type": "storage_containers" + }, + "cosmos_db_sql_containers": { + "attr_type": "cosmos_db_sql_containers" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingEventHubProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "connection_string": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_uri": { + "default": "none", + "param_type": "keyword_only" + }, + "entity_path": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_id": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_group": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "connection_string": { + "attr_type": "connection_string" + }, + "endpoint_uri": { + "attr_type": "endpoint_uri" + }, + "entity_path": { + "attr_type": "entity_path" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "name": { + "attr_type": "name" + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "resource_group": { + "attr_type": "resource_group" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingMessage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "default": "none", + "param_type": "keyword_only" + }, + "app_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "system_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "body": { + "attr_type": "body" + }, + "app_properties": { + "attr_type": "app_properties" + }, + "system_properties": { + "attr_type": "system_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "routes": { + "default": "none", + "param_type": "keyword_only" + }, + "fallback_route": { + "default": "none", + "param_type": "keyword_only" + }, + "enrichments": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "endpoints": { + "attr_type": "endpoints" + }, + "routes": { + "attr_type": "routes" + }, + "fallback_route": { + "attr_type": "fallback_route" + }, + "enrichments": { + "attr_type": "enrichments" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingServiceBusQueueEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "connection_string": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_uri": { + "default": "none", + "param_type": "keyword_only" + }, + "entity_path": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_id": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_group": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "connection_string": { + "attr_type": "connection_string" + }, + "endpoint_uri": { + "attr_type": "endpoint_uri" + }, + "entity_path": { + "attr_type": "entity_path" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "name": { + "attr_type": "name" + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "resource_group": { + "attr_type": "resource_group" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingServiceBusTopicEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "connection_string": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_uri": { + "default": "none", + "param_type": "keyword_only" + }, + "entity_path": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_id": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_group": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "connection_string": { + "attr_type": "connection_string" + }, + "endpoint_uri": { + "attr_type": "endpoint_uri" + }, + "entity_path": { + "attr_type": "entity_path" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "name": { + "attr_type": "name" + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "resource_group": { + "attr_type": "resource_group" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingSource": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVICE_CONNECTION_STATE_EVENTS": "DEVICE_CONNECTION_STATE_EVENTS", + "DEVICE_JOB_LIFECYCLE_EVENTS": "DEVICE_JOB_LIFECYCLE_EVENTS", + "DEVICE_LIFECYCLE_EVENTS": "DEVICE_LIFECYCLE_EVENTS", + "DEVICE_MESSAGES": "DEVICE_MESSAGES", + "DIGITAL_TWIN_CHANGE_EVENTS": "DIGITAL_TWIN_CHANGE_EVENTS", + "INVALID": "INVALID", + "MQTT_BROKER_MESSAGES": "MQTT_BROKER_MESSAGES", + "TWIN_CHANGE_EVENTS": "TWIN_CHANGE_EVENTS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutingStorageContainerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "default": null, + "param_type": "keyword_only" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "connection_string": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_uri": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "subscription_id": { + "default": "none", + "param_type": "keyword_only" + }, + "resource_group": { + "default": "none", + "param_type": "keyword_only" + }, + "file_name_format": { + "default": "none", + "param_type": "keyword_only" + }, + "batch_frequency_in_seconds": { + "default": "none", + "param_type": "keyword_only" + }, + "max_chunk_size_in_bytes": { + "default": "none", + "param_type": "keyword_only" + }, + "encoding": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "connection_string": { + "attr_type": "connection_string" + }, + "endpoint_uri": { + "attr_type": "endpoint_uri" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "name": { + "attr_type": "name" + }, + "subscription_id": { + "attr_type": "subscription_id" + }, + "resource_group": { + "attr_type": "resource_group" + }, + "container_name": { + "attr_type": "container_name" + }, + "file_name_format": { + "attr_type": "file_name_format" + }, + "batch_frequency_in_seconds": { + "attr_type": "batch_frequency_in_seconds" + }, + "max_chunk_size_in_bytes": { + "attr_type": "max_chunk_size_in_bytes" + }, + "encoding": { + "attr_type": "encoding" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingStorageContainerPropertiesEncoding": { + "type": "Enum", + "methods": {}, + "properties": { + "AVRO": "AVRO", + "AVRO_DEFLATE": "AVRO_DEFLATE", + "JSON": "JSON", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutingTwin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "RoutingTwinProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "desired": { + "default": "none", + "param_type": "keyword_only" + }, + "reported": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "desired": { + "attr_type": "desired" + }, + "reported": { + "attr_type": "reported" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SharedAccessSignatureAuthorizationRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "default": null, + "param_type": "keyword_only" + }, + "rights": { + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "secondary_key": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_name": { + "attr_type": "key_name" + }, + "primary_key": { + "attr_type": "primary_key" + }, + "secondary_key": { + "attr_type": "secondary_key" + }, + "rights": { + "attr_type": "rights" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SharedAccessSignatureAuthorizationRuleListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "StorageEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "connection_string": { + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "default": null, + "param_type": "keyword_only" + }, + "sas_ttl_as_iso8601": { + "default": "none", + "param_type": "keyword_only" + }, + "authentication_type": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sas_ttl_as_iso8601": { + "attr_type": "sas_ttl_as_iso8601" + }, + "connection_string": { + "attr_type": "connection_string" + }, + "container_name": { + "attr_type": "container_name" + }, + "authentication_type": { + "attr_type": "authentication_type" + }, + "identity": { + "attr_type": "identity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "default": "none", + "param_type": "keyword_only" + }, + "created_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "created_at": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_at": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_by": { + "attr_type": "created_by" + }, + "created_by_type": { + "attr_type": "created_by_type" + }, + "created_at": { + "attr_type": "created_at" + }, + "last_modified_by": { + "attr_type": "last_modified_by" + }, + "last_modified_by_type": { + "attr_type": "last_modified_by_type" + }, + "last_modified_at": { + "attr_type": "last_modified_at" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TagsResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TestAllRoutesInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "routing_source": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "twin": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "routing_source": { + "attr_type": "routing_source" + }, + "message": { + "attr_type": "message" + }, + "twin": { + "attr_type": "twin" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TestAllRoutesResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "routes": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "routes": { + "attr_type": "routes" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TestResultStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "UNDEFINED": "UNDEFINED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TestRouteInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "default": null, + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "twin": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "message": { + "attr_type": "message" + }, + "route": { + "attr_type": "route" + }, + "twin": { + "attr_type": "twin" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TestRouteResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "result": { + "default": "none", + "param_type": "keyword_only" + }, + "details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "result": { + "attr_type": "result" + }, + "details": { + "attr_type": "details" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TestRouteResultDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "compilation_errors": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "compilation_errors": { + "attr_type": "compilation_errors" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserSubscriptionQuota": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "type": { + "default": "none", + "param_type": "keyword_only" + }, + "unit": { + "default": "none", + "param_type": "keyword_only" + }, + "current_value": { + "default": "none", + "param_type": "keyword_only" + }, + "limit": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "type": { + "attr_type": "type" + }, + "unit": { + "attr_type": "unit" + }, + "current_value": { + "attr_type": "current_value" + }, + "limit": { + "attr_type": "limit" + }, + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "UserSubscriptionQuotaListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.aio": { + "class_nodes": { + "IotHubClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "iot_hub_resource": { + "attr_type": "IotHubResourceOperations" + }, + "resource_provider_common": { + "attr_type": "ResourceProviderCommonOperations" + }, + "certificates": { + "attr_type": "CertificatesOperations" + }, + "iot_hub": { + "attr_type": "IotHubOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.aio.operations": { + "class_nodes": { + "CertificatesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "CertificateDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "generate_verification_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_iot_hub": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "verify": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "CertificateVerificationDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_manual_failover": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "FailoverInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IotHubDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "TagsResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "OperationInputs", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "create_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "EventHubConsumerGroupBodyDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "export_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "ExportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_endpoint_health": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_job": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "job_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_keys_for_key_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_quota_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_stats": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_valid_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "import_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "ImportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_event_hub_consumer_groups": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_jobs": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "test_all_routes": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestAllRoutesInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "test_route": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestRouteInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ResourceProviderCommonOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_subscription_quota": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iothub/code_report_typespec.json b/sdk/iothub/azure-mgmt-iothub/code_report_typespec.json new file mode 100644 index 000000000000..5ed201c4ea66 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/code_report_typespec.json @@ -0,0 +1,23729 @@ +{ + "azure.mgmt.iothub": { + "class_nodes": { + "IotHubClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + }, + "iot_hub_resource": { + "attr_type": "IotHubResourceOperations" + }, + "iot_hub": { + "attr_type": "IotHubOperations" + }, + "certificates": { + "attr_type": "CertificatesOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "resource_provider_common": { + "attr_type": "ResourceProviderCommonOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.operations": { + "class_nodes": { + "CertificatesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "CertificateDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "generate_verification_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_iot_hub": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "verify": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "CertificateVerificationDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_manual_failover": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "FailoverInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IotHubDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "TagsResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "OperationInputs", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "create_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "EventHubConsumerGroupBodyDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "delete_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "export_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "ExportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_endpoint_health": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_job": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "job_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_keys_for_key_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_quota_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_stats": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_valid_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "import_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "ImportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_event_hub_consumer_groups": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_jobs": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "test_all_routes": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestAllRoutesInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "test_route": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestRouteInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "ResourceProviderCommonOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_subscription_quota": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.models": { + "class_nodes": { + "AccessRights": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVICE_CONNECT": "DEVICE_CONNECT", + "REGISTRY_READ": "REGISTRY_READ", + "REGISTRY_READ_DEVICE_CONNECT": "REGISTRY_READ_DEVICE_CONNECT", + "REGISTRY_READ_REGISTRY_WRITE": "REGISTRY_READ_REGISTRY_WRITE", + "REGISTRY_READ_REGISTRY_WRITE_DEVICE_CONNECT": "REGISTRY_READ_REGISTRY_WRITE_DEVICE_CONNECT", + "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT": "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT", + "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT": "REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT", + "REGISTRY_READ_SERVICE_CONNECT": "REGISTRY_READ_SERVICE_CONNECT", + "REGISTRY_READ_SERVICE_CONNECT_DEVICE_CONNECT": "REGISTRY_READ_SERVICE_CONNECT_DEVICE_CONNECT", + "REGISTRY_WRITE": "REGISTRY_WRITE", + "REGISTRY_WRITE_DEVICE_CONNECT": "REGISTRY_WRITE_DEVICE_CONNECT", + "REGISTRY_WRITE_SERVICE_CONNECT": "REGISTRY_WRITE_SERVICE_CONNECT", + "REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT": "REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT", + "SERVICE_CONNECT": "SERVICE_CONNECT", + "SERVICE_CONNECT_DEVICE_CONNECT": "SERVICE_CONNECT_DEVICE_CONNECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ArmIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Optional[Union[str, _models.ResourceIdentityType]]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "type": "Optional[dict[str, _models.ArmUserIdentity]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "tenant_id": "Optional", + "type": "Optional", + "user_assigned_identities": "Optional" + } + }, + "ArmUserIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "client_id": "Optional" + } + }, + "AuthenticationType": { + "type": "Enum", + "methods": {}, + "properties": { + "IDENTITY_BASED": "IDENTITY_BASED", + "KEY_BASED": "KEY_BASED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Capabilities": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVICE_MANAGEMENT": "DEVICE_MANAGEMENT", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CertificateDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CertificateProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "etag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CertificateListDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.CertificateDescription]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "CertificateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "is_verified": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "certificate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "policy_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": "Optional", + "expiry": "Optional", + "thumbprint": "Optional", + "is_verified": "Optional", + "created": "Optional", + "updated": "Optional", + "certificate": "Optional", + "policy_resource_id": "Optional" + } + }, + "CertificatePropertiesWithNonce": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "policy_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "subject": "Optional", + "expiry": "Optional", + "thumbprint": "Optional", + "is_verified": "Optional", + "created": "Optional", + "updated": "Optional", + "verification_code": "Optional", + "certificate": "Optional", + "policy_resource_id": "Optional" + } + }, + "CertificateVerificationDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "certificate": "Optional" + } + }, + "CertificateWithNonceDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.CertificatePropertiesWithNonce]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "etag": "Optional", + "type": "Optional" + } + }, + "CloudToDeviceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "max_delivery_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "default_ttl_as_iso8601": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "feedback": { + "type": "Optional[_models.FeedbackProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "max_delivery_count": "Optional", + "default_ttl_as_iso8601": "Optional", + "feedback": "Optional" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DefaultAction": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "DENY": "DENY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DeviceRegistry": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "namespace_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "namespace_resource_id": "Optional", + "identity_resource_id": "Optional" + } + }, + "EncryptionPropertiesDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_source": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault_properties": { + "type": "Optional[list[_models.KeyVaultKeyProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_source": "Optional", + "key_vault_properties": "Optional" + } + }, + "EndpointHealthData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "health_status": { + "type": "Optional[Union[str, _models.EndpointHealthStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "last_known_error": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_known_error_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_successful_send_attempt_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_send_attempt_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "endpoint_id": "Optional", + "health_status": "Optional", + "last_known_error": "Optional", + "last_known_error_time": "Optional", + "last_successful_send_attempt_time": "Optional", + "last_send_attempt_time": "Optional" + } + }, + "EndpointHealthStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "DEAD": "DEAD", + "DEGRADED": "DEGRADED", + "HEALTHY": "HEALTHY", + "UNHEALTHY": "UNHEALTHY", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EnrichmentProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "value": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_names": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key": null, + "value": null, + "endpoint_names": "list" + } + }, + "ErrorDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "http_status_code": "Optional", + "message": "Optional", + "details": "Optional" + } + }, + "EventHubConsumerGroupBodyDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.EventHubConsumerGroupName", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null + } + }, + "EventHubConsumerGroupInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[dict[str, Any]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "etag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EventHubConsumerGroupName": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null + } + }, + "EventHubProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "retention_time_in_days": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "partition_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "retention_time_in_days": "Optional", + "partition_count": "Optional", + "partition_ids": "Optional", + "path": "Optional", + "endpoint": "Optional" + } + }, + "ExportDevicesRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "export_blob_container_uri": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "exclude_keys": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + }, + "export_blob_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "include_configurations": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "configurations_blob_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "export_blob_container_uri": null, + "exclude_keys": null, + "export_blob_name": "Optional", + "authentication_type": "Optional", + "identity": "Optional", + "include_configurations": "Optional", + "configurations_blob_name": "Optional" + } + }, + "FailoverInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_region": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "failover_region": null + } + }, + "FallbackRouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "source": { + "type": "Union[str, _models.RoutingSource]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_names": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_enabled": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "source": "Union", + "condition": "Optional", + "endpoint_names": "list", + "is_enabled": null + } + }, + "FeedbackProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "lock_duration_as_iso8601": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_as_iso8601": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "max_delivery_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "lock_duration_as_iso8601": "Optional", + "ttl_as_iso8601": "Optional", + "max_delivery_count": "Optional" + } + }, + "GroupIdInformation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.GroupIdInformationProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "properties": null + } + }, + "GroupIdInformationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "required_members": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "required_zone_names": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "group_id": "Optional", + "required_members": "Optional", + "required_zone_names": "Optional" + } + }, + "ImportDevicesRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "input_blob_container_uri": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "output_blob_container_uri": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "input_blob_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "output_blob_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "include_configurations": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "configurations_blob_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "input_blob_container_uri": null, + "output_blob_container_uri": null, + "input_blob_name": "Optional", + "output_blob_name": "Optional", + "authentication_type": "Optional", + "identity": "Optional", + "include_configurations": "Optional", + "configurations_blob_name": "Optional" + } + }, + "IotHubCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "minimum": "Optional", + "maximum": "Optional", + "default": "Optional", + "scale_type": "Optional" + } + }, + "IotHubDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "_models.IotHubSkuInfo", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.IotHubProperties]", + "default": null, + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ArmIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "etag": "Optional", + "sku": null, + "identity": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IotHubLocationDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "role": { + "type": "Optional[Union[str, _models.IotHubReplicaRoleType]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "location": "Optional", + "role": "Optional" + } + }, + "IotHubNameAvailabilityInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name_available": "Optional", + "reason": "Optional", + "message": "Optional" + } + }, + "IotHubNameUnavailabilityReason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "authorization_policies": { + "type": "Optional[list[_models.SharedAccessSignatureAuthorizationRule]]", + "default": null, + "param_type": "keyword_only" + }, + "disable_local_auth": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "disable_device_sas": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "disable_module_sas": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "restrict_outbound_network_access": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_fqdn_list": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "public_network_access": { + "type": "Optional[Union[str, _models.PublicNetworkAccess]]", + "default": null, + "param_type": "keyword_only" + }, + "ip_filter_rules": { + "type": "Optional[list[_models.IpFilterRule]]", + "default": null, + "param_type": "keyword_only" + }, + "network_rule_sets": { + "type": "Optional[_models.NetworkRuleSetProperties]", + "default": null, + "param_type": "keyword_only" + }, + "min_tls_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint_connections": { + "type": "Optional[list[_models.PrivateEndpointConnection]]", + "default": null, + "param_type": "keyword_only" + }, + "event_hub_endpoints": { + "type": "Optional[dict[str, _models.EventHubProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "routing": { + "type": "Optional[_models.RoutingProperties]", + "default": null, + "param_type": "keyword_only" + }, + "storage_endpoints": { + "type": "Optional[dict[str, _models.StorageEndpointProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "messaging_endpoints": { + "type": "Optional[dict[str, _models.MessagingEndpointProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "enable_file_upload_notifications": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "cloud_to_device": { + "type": "Optional[_models.CloudToDeviceProperties]", + "default": null, + "param_type": "keyword_only" + }, + "comments": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "device_streams": { + "type": "Optional[_models.IotHubPropertiesDeviceStreams]", + "default": null, + "param_type": "keyword_only" + }, + "features": { + "type": "Optional[Union[str, _models.Capabilities]]", + "default": null, + "param_type": "keyword_only" + }, + "encryption": { + "type": "Optional[_models.EncryptionPropertiesDescription]", + "default": null, + "param_type": "keyword_only" + }, + "enable_data_residency": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "root_certificate": { + "type": "Optional[_models.RootCertificateProperties]", + "default": null, + "param_type": "keyword_only" + }, + "ip_version": { + "type": "Optional[Union[str, _models.IpVersion]]", + "default": null, + "param_type": "keyword_only" + }, + "device_registry": { + "type": "Optional[_models.DeviceRegistry]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "authorization_policies": "Optional", + "disable_local_auth": "Optional", + "disable_device_sas": "Optional", + "disable_module_sas": "Optional", + "restrict_outbound_network_access": "Optional", + "allowed_fqdn_list": "Optional", + "public_network_access": "Optional", + "ip_filter_rules": "Optional", + "network_rule_sets": "Optional", + "min_tls_version": "Optional", + "private_endpoint_connections": "Optional", + "provisioning_state": "Optional", + "state": "Optional", + "host_name": "Optional", + "event_hub_endpoints": "Optional", + "routing": "Optional", + "storage_endpoints": "Optional", + "messaging_endpoints": "Optional", + "enable_file_upload_notifications": "Optional", + "cloud_to_device": "Optional", + "comments": "Optional", + "device_streams": "Optional", + "features": "Optional", + "encryption": "Optional", + "locations": "Optional", + "enable_data_residency": "Optional", + "root_certificate": "Optional", + "ip_version": "Optional", + "device_registry": "Optional" + } + }, + "IotHubPropertiesDeviceStreams": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "streaming_endpoints": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "streaming_endpoints": "Optional" + } + }, + "IotHubQuotaMetricInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "current_value": "Optional", + "max_value": "Optional" + } + }, + "IotHubReplicaRoleType": { + "type": "Enum", + "methods": {}, + "properties": { + "PRIMARY": "PRIMARY", + "SECONDARY": "SECONDARY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubSku": { + "type": "Enum", + "methods": {}, + "properties": { + "B1": "B1", + "B2": "B2", + "B3": "B3", + "F1": "F1", + "GEN2": "GEN2", + "S1": "S1", + "S2": "S2", + "S3": "S3", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubSkuDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "sku": { + "type": "_models.IotHubSkuInfo", + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "type": "_models.IotHubCapacity", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "sku": null, + "capacity": null + } + }, + "IotHubSkuInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Union[str, _models.IotHubSku]", + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Union", + "tier": "Optional", + "capacity": "Optional" + } + }, + "IotHubSkuTier": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "FREE": "FREE", + "GENERATION2": "GENERATION2", + "STANDARD": "STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IpFilterActionType": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCEPT": "ACCEPT", + "REJECT": "REJECT", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IpFilterRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "filter_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Union[str, _models.IpFilterActionType]", + "default": null, + "param_type": "keyword_only" + }, + "ip_mask": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "filter_name": null, + "action": "Union", + "ip_mask": null + } + }, + "IpVersion": { + "type": "Enum", + "methods": {}, + "properties": { + "IPV4": "IPV4", + "IPV4_IPV6": "IPV4_IPV6", + "IPV6": "IPV6", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "JobResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "job_id": "Optional", + "start_time_utc": "Optional", + "end_time_utc": "Optional", + "type": "Optional", + "status": "Optional", + "failure_reason": "Optional", + "status_message": "Optional", + "parent_job_id": "Optional" + } + }, + "JobStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "CANCELLED": "CANCELLED", + "COMPLETED": "COMPLETED", + "ENQUEUED": "ENQUEUED", + "FAILED": "FAILED", + "RUNNING": "RUNNING", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "JobType": { + "type": "Enum", + "methods": {}, + "properties": { + "BACKUP": "BACKUP", + "EXPORT": "EXPORT", + "FACTORY_RESET_DEVICE": "FACTORY_RESET_DEVICE", + "FIRMWARE_UPDATE": "FIRMWARE_UPDATE", + "IMPORT": "IMPORT", + "READ_DEVICE_PROPERTIES": "READ_DEVICE_PROPERTIES", + "REBOOT_DEVICE": "REBOOT_DEVICE", + "UNKNOWN": "UNKNOWN", + "UPDATE_DEVICE_CONFIGURATION": "UPDATE_DEVICE_CONFIGURATION", + "WRITE_DEVICE_PROPERTIES": "WRITE_DEVICE_PROPERTIES", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultKeyProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_identifier": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_identifier": "Optional", + "identity": "Optional" + } + }, + "ManagedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "user_assigned_identity": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "user_assigned_identity": "Optional" + } + }, + "MatchedRoute": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.RouteProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "MessagingEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "lock_duration_as_iso8601": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "ttl_as_iso8601": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "max_delivery_count": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "lock_duration_as_iso8601": "Optional", + "ttl_as_iso8601": "Optional", + "max_delivery_count": "Optional" + } + }, + "Name": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "localized_value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "localized_value": "Optional" + } + }, + "NetworkRuleIPAction": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkRuleSetIpRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "filter_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "ip_mask": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "action": { + "type": "Optional[Union[str, _models.NetworkRuleIPAction]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "filter_name": null, + "action": "Optional", + "ip_mask": null + } + }, + "NetworkRuleSetProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "apply_to_built_in_event_hub_endpoint": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + }, + "ip_rules": { + "type": "list[_models.NetworkRuleSetIpRule]", + "default": null, + "param_type": "keyword_only" + }, + "default_action": { + "type": "Optional[Union[str, _models.DefaultAction]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "default_action": "Optional", + "apply_to_built_in_event_hub_endpoint": null, + "ip_rules": "list" + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display": "Optional" + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "resource": "Optional", + "operation": "Optional", + "description": "Optional" + } + }, + "OperationInputs": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null + } + }, + "PrivateEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "PrivateEndpointConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "_models.PrivateEndpointConnectionProperties", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "properties": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PrivateEndpointConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "type": "_models.PrivateLinkServiceConnectionState", + "default": null, + "param_type": "keyword_only" + }, + "private_endpoint": { + "type": "Optional[_models.PrivateEndpoint]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "private_endpoint": "Optional", + "private_link_service_connection_state": null + } + }, + "PrivateLinkResources": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.GroupIdInformation]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "PrivateLinkServiceConnectionState": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Union[str, _models.PrivateLinkServiceConnectionStatus]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "actions_required": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "status": "Union", + "description": null, + "actions_required": "Optional" + } + }, + "PrivateLinkServiceConnectionStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "APPROVED": "APPROVED", + "DISCONNECTED": "DISCONNECTED", + "PENDING": "PENDING", + "REJECTED": "REJECTED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PublicNetworkAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RegistryStatistics": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "total_device_count": "Optional", + "enabled_device_count": "Optional", + "disabled_device_count": "Optional" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ResourceIdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RootCertificateProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "enable_root_certificate_v2": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "enable_root_certificate_v2": "Optional", + "last_updated_time_utc": "Optional" + } + }, + "RouteCompilationError": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "severity": { + "type": "Optional[Union[str, _models.RouteErrorSeverity]]", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[_models.RouteErrorRange]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "message": "Optional", + "severity": "Optional", + "location": "Optional" + } + }, + "RouteErrorPosition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "line": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "column": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "line": "Optional", + "column": "Optional" + } + }, + "RouteErrorRange": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "start": { + "type": "Optional[_models.RouteErrorPosition]", + "default": null, + "param_type": "keyword_only" + }, + "end": { + "type": "Optional[_models.RouteErrorPosition]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "start": "Optional", + "end": "Optional" + } + }, + "RouteErrorSeverity": { + "type": "Enum", + "methods": {}, + "properties": { + "ERROR": "ERROR", + "WARNING": "WARNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RouteProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "source": { + "type": "Union[str, _models.RoutingSource]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_names": { + "type": "list[str]", + "default": null, + "param_type": "keyword_only" + }, + "is_enabled": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + }, + "condition": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "source": "Union", + "condition": "Optional", + "endpoint_names": "list", + "is_enabled": null + } + }, + "RoutingCosmosDBSqlApiProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_uri": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_group": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "partition_key_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "partition_key_template": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "name": null, + "id": "Optional", + "subscription_id": "Optional", + "resource_group": "Optional", + "endpoint_uri": null, + "authentication_type": "Optional", + "identity": "Optional", + "primary_key": "Optional", + "secondary_key": "Optional", + "database_name": null, + "container_name": null, + "partition_key_name": "Optional", + "partition_key_template": "Optional" + } + }, + "RoutingEndpoints": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "service_bus_queues": { + "type": "Optional[list[_models.RoutingServiceBusQueueEndpointProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "service_bus_topics": { + "type": "Optional[list[_models.RoutingServiceBusTopicEndpointProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "event_hubs": { + "type": "Optional[list[_models.RoutingEventHubProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "storage_containers": { + "type": "Optional[list[_models.RoutingStorageContainerProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "cosmos_db_sql_containers": { + "type": "Optional[list[_models.RoutingCosmosDBSqlApiProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "service_bus_queues": "Optional", + "service_bus_topics": "Optional", + "event_hubs": "Optional", + "storage_containers": "Optional", + "cosmos_db_sql_containers": "Optional" + } + }, + "RoutingEventHubProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "connection_string": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_uri": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "entity_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_group": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "connection_string": "Optional", + "endpoint_uri": "Optional", + "entity_path": "Optional", + "authentication_type": "Optional", + "identity": "Optional", + "name": null, + "subscription_id": "Optional", + "resource_group": "Optional" + } + }, + "RoutingMessage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "body": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "app_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "system_properties": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "body": "Optional", + "app_properties": "Optional", + "system_properties": "Optional" + } + }, + "RoutingProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoints": { + "type": "Optional[_models.RoutingEndpoints]", + "default": null, + "param_type": "keyword_only" + }, + "routes": { + "type": "Optional[list[_models.RouteProperties]]", + "default": null, + "param_type": "keyword_only" + }, + "fallback_route": { + "type": "Optional[_models.FallbackRouteProperties]", + "default": null, + "param_type": "keyword_only" + }, + "enrichments": { + "type": "Optional[list[_models.EnrichmentProperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "endpoints": "Optional", + "routes": "Optional", + "fallback_route": "Optional", + "enrichments": "Optional" + } + }, + "RoutingServiceBusQueueEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "connection_string": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_uri": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "entity_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_group": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "connection_string": "Optional", + "endpoint_uri": "Optional", + "entity_path": "Optional", + "authentication_type": "Optional", + "identity": "Optional", + "name": null, + "subscription_id": "Optional", + "resource_group": "Optional" + } + }, + "RoutingServiceBusTopicEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "connection_string": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_uri": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "entity_path": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_group": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "connection_string": "Optional", + "endpoint_uri": "Optional", + "entity_path": "Optional", + "authentication_type": "Optional", + "identity": "Optional", + "name": null, + "subscription_id": "Optional", + "resource_group": "Optional" + } + }, + "RoutingSource": { + "type": "Enum", + "methods": {}, + "properties": { + "DEVICE_CONNECTION_STATE_EVENTS": "DEVICE_CONNECTION_STATE_EVENTS", + "DEVICE_JOB_LIFECYCLE_EVENTS": "DEVICE_JOB_LIFECYCLE_EVENTS", + "DEVICE_LIFECYCLE_EVENTS": "DEVICE_LIFECYCLE_EVENTS", + "DEVICE_MESSAGES": "DEVICE_MESSAGES", + "DIGITAL_TWIN_CHANGE_EVENTS": "DIGITAL_TWIN_CHANGE_EVENTS", + "INVALID": "INVALID", + "MQTT_BROKER_MESSAGES": "MQTT_BROKER_MESSAGES", + "TWIN_CHANGE_EVENTS": "TWIN_CHANGE_EVENTS", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutingStorageContainerProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "connection_string": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_uri": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + }, + "subscription_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource_group": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "file_name_format": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "batch_frequency_in_seconds": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "max_chunk_size_in_bytes": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "encoding": { + "type": "Optional[Union[str, _models.RoutingStorageContainerPropertiesEncoding]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "connection_string": "Optional", + "endpoint_uri": "Optional", + "authentication_type": "Optional", + "identity": "Optional", + "name": null, + "subscription_id": "Optional", + "resource_group": "Optional", + "container_name": null, + "file_name_format": "Optional", + "batch_frequency_in_seconds": "Optional", + "max_chunk_size_in_bytes": "Optional", + "encoding": "Optional" + } + }, + "RoutingStorageContainerPropertiesEncoding": { + "type": "Enum", + "methods": {}, + "properties": { + "AVRO": "AVRO", + "AVRO_DEFLATE": "AVRO_DEFLATE", + "JSON": "JSON", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "RoutingTwin": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.RoutingTwinProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "properties": "Optional" + } + }, + "RoutingTwinProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "desired": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + }, + "reported": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "desired": "Optional", + "reported": "Optional" + } + }, + "SharedAccessSignatureAuthorizationRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "rights": { + "type": "Union[str, _models.AccessRights]", + "default": null, + "param_type": "keyword_only" + }, + "primary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "secondary_key": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "key_name": null, + "primary_key": "Optional", + "secondary_key": "Optional", + "rights": "Union" + } + }, + "StorageEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "connection_string": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "container_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "sas_ttl_as_iso8601": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "authentication_type": { + "type": "Optional[Union[str, _models.AuthenticationType]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.ManagedIdentity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "sas_ttl_as_iso8601": "Optional", + "connection_string": null, + "container_name": null, + "authentication_type": "Optional", + "identity": "Optional" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "created_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "created_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "created_by": "Optional", + "created_by_type": "Optional", + "created_at": "Optional", + "last_modified_by": "Optional", + "last_modified_by_type": "Optional", + "last_modified_at": "Optional" + } + }, + "TagsResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": "Optional" + } + }, + "TestAllRoutesInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "routing_source": { + "type": "Optional[Union[str, _models.RoutingSource]]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[_models.RoutingMessage]", + "default": null, + "param_type": "keyword_only" + }, + "twin": { + "type": "Optional[_models.RoutingTwin]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "routing_source": "Optional", + "message": "Optional", + "twin": "Optional" + } + }, + "TestAllRoutesResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "routes": { + "type": "Optional[list[_models.MatchedRoute]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "routes": "Optional" + } + }, + "TestResultStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "FALSE": "FALSE", + "TRUE": "TRUE", + "UNDEFINED": "UNDEFINED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "TestRouteInput": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "route": { + "type": "_models.RouteProperties", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[_models.RoutingMessage]", + "default": null, + "param_type": "keyword_only" + }, + "twin": { + "type": "Optional[_models.RoutingTwin]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "message": "Optional", + "route": null, + "twin": "Optional" + } + }, + "TestRouteResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "result": { + "type": "Optional[Union[str, _models.TestResultStatus]]", + "default": null, + "param_type": "keyword_only" + }, + "details": { + "type": "Optional[_models.TestRouteResultDetails]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "result": "Optional", + "details": "Optional" + } + }, + "TestRouteResultDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "compilation_errors": { + "type": "Optional[list[_models.RouteCompilationError]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "compilation_errors": "Optional" + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "UserSubscriptionQuota": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "unit": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "current_value": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "limit": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[_models.Name]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "type": "Optional", + "unit": "Optional", + "current_value": "Optional", + "limit": "Optional", + "name": "Optional" + } + }, + "UserSubscriptionQuotaListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.UserSubscriptionQuota]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": null + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "next_link": "Optional" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.aio": { + "class_nodes": { + "IotHubClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + }, + "iot_hub_resource": { + "attr_type": "IotHubResourceOperations" + }, + "iot_hub": { + "attr_type": "IotHubOperations" + }, + "certificates": { + "attr_type": "CertificatesOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "resource_provider_common": { + "attr_type": "ResourceProviderCommonOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.iothub.aio.operations": { + "class_nodes": { + "CertificatesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "CertificateDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "generate_verification_code": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list_by_iot_hub": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "verify": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "CertificateVerificationDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "certificate_verification_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "MatchConditions", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_manual_failover": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "FailoverInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "failover_input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "IotHubResourceOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IotHubDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_description": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "TagsResource", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_tags": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "OperationInputs", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_inputs": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "create_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "EventHubConsumerGroupBodyDescription", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "consumer_group_body": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "delete_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "export_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "ExportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "export_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_endpoint_health": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_event_hub_consumer_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_job": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "job_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_keys_for_key_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_quota_metrics": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_stats": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "get_valid_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "import_devices": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "ImportDevicesRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "import_devices_parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_by_subscription": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_event_hub_consumer_groups": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_jobs": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list_keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "test_all_routes": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestAllRoutesInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "test_route": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "TestRouteInput", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "input": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": null + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "group_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + }, + "ResourceProviderCommonOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "overloads": [] + }, + "get_subscription_quota": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py index 4aaa65636fd0..c868a65a16ca 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.check_name_availability( @@ -37,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/checkNameAvailability.json +# x-ms-original-file: 2025-08-01-preview/checkNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_certificates_with_device_registry_policy.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_certificates_with_device_registry_policy.py index a9f243cb1f46..fd7f21d90cc2 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_certificates_with_device_registry_policy.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_certificates_with_device_registry_policy.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificates.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/CreateOrReplace_Certificates_With_DeviceRegistryPolicy.json +# x-ms-original-file: 2025-08-01-preview/CreateOrReplace_Certificates_With_DeviceRegistryPolicy.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_io_thub_with_device_registry.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_io_thub_with_device_registry.py index 6dce37dabb25..069d7f0d5a13 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_io_thub_with_device_registry.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_io_thub_with_device_registry.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.begin_create_or_update( @@ -97,6 +97,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/CreateOrReplace_IoTHub_With_DeviceRegistry.json +# x-ms-original-file: 2025-08-01-preview/CreateOrReplace_IoTHub_With_DeviceRegistry.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py index ae59014d8375..fbfd258c9338 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) client.iot_hub.begin_manual_failover( @@ -38,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/IotHub_ManualFailover.json +# x-ms-original-file: 2025-08-01-preview/IotHub_ManualFailover.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py index e95e4027e6a0..dac17a901f24 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificates.create_or_update( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_certificatescreateorupdate.json +# x-ms-original-file: 2025-08-01-preview/iothub_certificatescreateorupdate.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py index 5a04b8e2bb18..1c2c366a2965 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,17 +27,18 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) client.certificates.delete( resource_group_name="myResourceGroup", resource_name="myhub", certificate_name="cert", - if_match="AAAAAAAADGk=", + etag="str", + match_condition=~azure.core.MatchConditions, ) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_certificatesdelete.json +# x-ms-original-file: 2025-08-01-preview/iothub_certificatesdelete.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py index b7ba35132f50..dd0861106d9d 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,19 +27,20 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificates.verify( resource_group_name="myResourceGroup", resource_name="myFirstProvisioningService", certificate_name="cert", - if_match="AAAAAAAADGk=", certificate_verification_body={"certificate": "#####################################"}, + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_certverify.json +# x-ms-original-file: 2025-08-01-preview/iothub_certverify.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py index 96569686e3bf..f9f0cff878f7 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.begin_create_or_update( @@ -93,6 +92,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_createOrUpdate.json +# x-ms-original-file: 2025-08-01-preview/iothub_createOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py index 8961d0e1dbee..2727cffafbd4 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.create_event_hub_consumer_group( @@ -41,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_createconsumergroup.json +# x-ms-original-file: 2025-08-01-preview/iothub_createconsumergroup.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py index c38cefb02ed5..7a2a343e15de 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.begin_delete( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_delete.json +# x-ms-original-file: 2025-08-01-preview/iothub_delete.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py index 344a067729b9..7b9ec1a3dfe0 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) client.iot_hub_resource.delete_event_hub_consumer_group( @@ -39,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_deleteconsumergroup.json +# x-ms-original-file: 2025-08-01-preview/iothub_deleteconsumergroup.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py index 48e6c9798624..80ad9488c770 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connections.begin_delete( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_deleteprivateendpointconnection.json +# x-ms-original-file: 2025-08-01-preview/iothub_deleteprivateendpointconnection.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py index 895983367175..4a91c0c85e4b 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py @@ -3,7 +3,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +28,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.export_devices( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_exportdevices.json +# x-ms-original-file: 2025-08-01-preview/iothub_exportdevices.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py index b32504a81f83..56834d160604 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,18 +27,19 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificates.generate_verification_code( resource_group_name="myResourceGroup", resource_name="testHub", certificate_name="cert", - if_match="AAAAAAAADGk=", + etag="str", + match_condition=~azure.core.MatchConditions, ) print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_generateverificationcode.json +# x-ms-original-file: 2025-08-01-preview/iothub_generateverificationcode.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py index 4e36989b71b4..4c768fe6d4cc 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_get.json +# x-ms-original-file: 2025-08-01-preview/iothub_get.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py index 4ebb99350a2e..74abd9e099af 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificates.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getcertificate.json +# x-ms-original-file: 2025-08-01-preview/iothub_getcertificate.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py index 0de7ddec46fd..51ab82342d1d 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get_event_hub_consumer_group( @@ -40,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getconsumergroup.json +# x-ms-original-file: 2025-08-01-preview/iothub_getconsumergroup.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py index d8cc47896713..797de92452c0 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get_job( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getjob.json +# x-ms-original-file: 2025-08-01-preview/iothub_getjob.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py index f5e6954934a2..fcda1ecfe643 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get_keys_for_key_name( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getkey.json +# x-ms-original-file: 2025-08-01-preview/iothub_getkey.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py index 62e733db33a1..839e66019883 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connections.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getprivateendpointconnection.json +# x-ms-original-file: 2025-08-01-preview/iothub_getprivateendpointconnection.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py index 724ab0ea16c9..6861ff633c5e 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_link_resources.get( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getprivatelinkresources.json +# x-ms-original-file: 2025-08-01-preview/iothub_getprivatelinkresources.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py index 78db3b086026..d81c485d8579 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get_valid_skus( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getskus.json +# x-ms-original-file: 2025-08-01-preview/iothub_getskus.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py index 920ed0d13eba..f75abaf3365f 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.import_devices( @@ -39,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_importdevices.json +# x-ms-original-file: 2025-08-01-preview/iothub_importdevices.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py index 75305a91b1a9..b1267f127104 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.list_by_resource_group( @@ -38,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listbyrg.json +# x-ms-original-file: 2025-08-01-preview/iothub_listbyrg.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py index d2e4c3f6346e..d93a2ee35876 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.list_by_subscription() @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listbysubscription.json +# x-ms-original-file: 2025-08-01-preview/iothub_listbysubscription.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py index 415c7629aaf2..8ab7309c4b70 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.certificates.list_by_iot_hub( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listcertificates.json +# x-ms-original-file: 2025-08-01-preview/iothub_listcertificates.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py index 9d2e0ea8e203..0b1691098376 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.list_event_hub_consumer_groups( @@ -40,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listehgroups.json +# x-ms-original-file: 2025-08-01-preview/iothub_listehgroups.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py index c6b4b1953c0b..1f1b858dd2e9 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.list_jobs( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listjobs.json +# x-ms-original-file: 2025-08-01-preview/iothub_listjobs.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py index 74810e4b0b90..83750ee2b871 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.list_keys( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listkeys.json +# x-ms-original-file: 2025-08-01-preview/iothub_listkeys.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py index 338f56f1db80..3b0971814ac5 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connections.list( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listprivateendpointconnections.json +# x-ms-original-file: 2025-08-01-preview/iothub_listprivateendpointconnections.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py index 45ae7b4b8e62..dc6596ceb269 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_link_resources.list( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listprivatelinkresources.json +# x-ms-original-file: 2025-08-01-preview/iothub_listprivatelinkresources.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py index 483460b162ff..869a487537f7 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -36,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_operations.json +# x-ms-original-file: 2025-08-01-preview/iothub_operations.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_patch.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_patch.py new file mode 100644 index 000000000000..742520db62b2 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_patch.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.iothub import IotHubClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-iothub +# USAGE + python iothub_patch.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = IotHubClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.iot_hub_resource.begin_update( + resource_group_name="myResourceGroup", + resource_name="myHub", + iot_hub_tags={"tags": {"foo": "bar"}}, + ).result() + print(response) + + +# x-ms-original-file: 2025-08-01-preview/iothub_patch.json +if __name__ == "__main__": + main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py index 4925c7422c15..14b032b09ade 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get_quota_metrics( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_quotametrics.json +# x-ms-original-file: 2025-08-01-preview/iothub_quotametrics.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py index 146ec5dba4fe..e101a54ea44c 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get_endpoint_health( @@ -39,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_routingendpointhealth.json +# x-ms-original-file: 2025-08-01-preview/iothub_routingendpointhealth.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py index 3487ebd523f5..9000d4477c59 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.get_stats( @@ -38,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_stats.json +# x-ms-original-file: 2025-08-01-preview/iothub_stats.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py index 7a97d84080f1..623b970c25ad 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.test_all_routes( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_testallroutes.json +# x-ms-original-file: 2025-08-01-preview/iothub_testallroutes.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py index f241236677da..800a9c890680 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.iot_hub_resource.test_route( @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_testnewroute.json +# x-ms-original-file: 2025-08-01-preview/iothub_testnewroute.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py index 4bcaf16a699e..7d01a06baef1 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,7 +27,7 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connections.begin_update( @@ -38,7 +37,7 @@ def main(): private_endpoint_connection={ "properties": { "privateLinkServiceConnectionState": { - "description": "Approved by johndoe@contoso.com", + "description": "Approved by `johndoe@contoso.com `_", "status": "Approved", } } @@ -47,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_updateprivateendpointconnection.json +# x-ms-original-file: 2025-08-01-preview/iothub_updateprivateendpointconnection.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py index 13be51a16f38..c01bab8af780 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py @@ -1,9 +1,8 @@ -# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -28,13 +27,13 @@ def main(): client = IotHubClient( credential=DefaultAzureCredential(), - subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + subscription_id="SUBSCRIPTION_ID", ) response = client.resource_provider_common.get_subscription_quota() print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_usages.json +# x-ms-original-file: 2025-08-01-preview/iothub_usages.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/conftest.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/conftest.py index 9295eb6a84ee..51343b58e7b7 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/conftest.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py index 24487c7b65e2..a6eaffc921c9 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestIotHubCertificatesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(IotHubClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_certificates_list_by_iot_hub(self, resource_group): - response = self.client.certificates.list_by_iot_hub( - resource_group_name=resource_group.name, - resource_name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_certificates_get(self, resource_group): @@ -37,7 +25,6 @@ def test_certificates_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -64,9 +51,16 @@ def test_certificates_create_or_update(self, resource_group): "thumbprint": "str", "updated": "2020-02-20 00:00:00", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -79,8 +73,19 @@ def test_certificates_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - if_match="str", - api_version="2025-08-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_certificates_list_by_iot_hub(self, resource_group): + response = self.client.certificates.list_by_iot_hub( + resource_group_name=resource_group.name, + resource_name="str", ) # please add some check logic here by yourself @@ -93,8 +98,8 @@ def test_certificates_generate_verification_code(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - if_match="str", - api_version="2025-08-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -107,9 +112,9 @@ def test_certificates_verify(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - if_match="str", certificate_verification_body={"certificate": "str"}, - api_version="2025-08-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py index f4af89cb2b1a..bf070b8be6e7 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestIotHubCertificatesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(IotHubClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_certificates_list_by_iot_hub(self, resource_group): - response = await self.client.certificates.list_by_iot_hub( - resource_group_name=resource_group.name, - resource_name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_certificates_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_certificates_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -65,9 +52,16 @@ async def test_certificates_create_or_update(self, resource_group): "thumbprint": "str", "updated": "2020-02-20 00:00:00", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -80,8 +74,19 @@ async def test_certificates_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - if_match="str", - api_version="2025-08-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_certificates_list_by_iot_hub(self, resource_group): + response = await self.client.certificates.list_by_iot_hub( + resource_group_name=resource_group.name, + resource_name="str", ) # please add some check logic here by yourself @@ -94,8 +99,8 @@ async def test_certificates_generate_verification_code(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - if_match="str", - api_version="2025-08-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself @@ -108,9 +113,9 @@ async def test_certificates_verify(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - if_match="str", certificate_verification_body={"certificate": "str"}, - api_version="2025-08-01-preview", + etag="str", + match_condition=~azure.core.MatchConditions, ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py index fb5e8b0718bc..7e15e58c3943 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ def test_iot_hub_begin_manual_failover(self, resource_group): iot_hub_name="str", resource_group_name=resource_group.name, failover_input={"failoverRegion": "str"}, - api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py index a3c5082eef8f..62ea2496b68a 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -27,7 +27,6 @@ async def test_iot_hub_begin_manual_failover(self, resource_group): iot_hub_name="str", resource_group_name=resource_group.name, failover_input={"failoverRegion": "str"}, - api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py index c2631c500d3e..30aa04f6f68c 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_iot_hub_resource_get(self, resource_group): response = self.client.iot_hub_resource.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -98,8 +97,8 @@ def test_iot_hub_resource_begin_create_or_update(self, resource_group): "minTlsVersion": "str", "networkRuleSets": { "applyToBuiltInEventHubEndpoint": bool, - "ipRules": [{"filterName": "str", "ipMask": "str", "action": "Allow"}], - "defaultAction": "Deny", + "ipRules": [{"filterName": "str", "ipMask": "str", "action": "str"}], + "defaultAction": "str", }, "privateEndpointConnections": [ { @@ -113,6 +112,14 @@ def test_iot_hub_resource_begin_create_or_update(self, resource_group): }, "id": "str", "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -236,7 +243,6 @@ def test_iot_hub_resource_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -249,7 +255,6 @@ def test_iot_hub_resource_begin_update(self, resource_group): resource_group_name=resource_group.name, resource_name="str", iot_hub_tags={"tags": {"str": "str"}}, - api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -261,28 +266,16 @@ def test_iot_hub_resource_begin_delete(self, resource_group): response = self.client.iot_hub_resource.begin_delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_iot_hub_resource_list_by_subscription(self, resource_group): - response = self.client.iot_hub_resource.list_by_subscription( - api_version="2025-08-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_iot_hub_resource_list_by_resource_group(self, resource_group): response = self.client.iot_hub_resource.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -290,13 +283,9 @@ def test_iot_hub_resource_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_iot_hub_resource_get_stats(self, resource_group): - response = self.client.iot_hub_resource.get_stats( - resource_group_name=resource_group.name, - resource_name="str", - api_version="2025-08-01-preview", - ) - + def test_iot_hub_resource_list_by_subscription(self, resource_group): + response = self.client.iot_hub_resource.list_by_subscription() + result = [r for r in response] # please add some check logic here by yourself # ... @@ -306,75 +295,17 @@ def test_iot_hub_resource_get_valid_skus(self, resource_group): response = self.client.iot_hub_resource.get_valid_skus( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_iot_hub_resource_list_event_hub_consumer_groups(self, resource_group): - response = self.client.iot_hub_resource.list_event_hub_consumer_groups( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_iot_hub_resource_get_event_hub_consumer_group(self, resource_group): - response = self.client.iot_hub_resource.get_event_hub_consumer_group( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_iot_hub_resource_create_event_hub_consumer_group(self, resource_group): - response = self.client.iot_hub_resource.create_event_hub_consumer_group( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - name="str", - consumer_group_body={"properties": {"name": "str"}}, - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_iot_hub_resource_delete_event_hub_consumer_group(self, resource_group): - response = self.client.iot_hub_resource.delete_event_hub_consumer_group( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_iot_hub_resource_list_jobs(self, resource_group): response = self.client.iot_hub_resource.list_jobs( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -387,7 +318,6 @@ def test_iot_hub_resource_get_job(self, resource_group): resource_group_name=resource_group.name, resource_name="str", job_id="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -399,7 +329,6 @@ def test_iot_hub_resource_get_quota_metrics(self, resource_group): response = self.client.iot_hub_resource.get_quota_metrics( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -411,23 +340,11 @@ def test_iot_hub_resource_get_endpoint_health(self, resource_group): response = self.client.iot_hub_resource.get_endpoint_health( resource_group_name=resource_group.name, iot_hub_name="str", - api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_iot_hub_resource_check_name_availability(self, resource_group): - response = self.client.iot_hub_resource.check_name_availability( - operation_inputs={"name": "str"}, - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_iot_hub_resource_test_all_routes(self, resource_group): @@ -439,7 +356,6 @@ def test_iot_hub_resource_test_all_routes(self, resource_group): "routingSource": "str", "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -462,7 +378,6 @@ def test_iot_hub_resource_test_route(self, resource_group): "message": {"appProperties": {"str": "str"}, "body": "str", "systemProperties": {"str": "str"}}, "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -474,7 +389,6 @@ def test_iot_hub_resource_list_keys(self, resource_group): response = self.client.iot_hub_resource.list_keys( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -487,7 +401,6 @@ def test_iot_hub_resource_get_keys_for_key_name(self, resource_group): resource_group_name=resource_group.name, resource_name="str", key_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -508,7 +421,6 @@ def test_iot_hub_resource_export_devices(self, resource_group): "identity": {"userAssignedIdentity": "str"}, "includeConfigurations": bool, }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -530,7 +442,79 @@ def test_iot_hub_resource_import_devices(self, resource_group): "inputBlobName": "str", "outputBlobName": "str", }, - api_version="2025-08-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_iot_hub_resource_get_stats(self, resource_group): + response = self.client.iot_hub_resource.get_stats( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_iot_hub_resource_get_event_hub_consumer_group(self, resource_group): + response = self.client.iot_hub_resource.get_event_hub_consumer_group( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_iot_hub_resource_create_event_hub_consumer_group(self, resource_group): + response = self.client.iot_hub_resource.create_event_hub_consumer_group( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + name="str", + consumer_group_body={"properties": {"name": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_iot_hub_resource_delete_event_hub_consumer_group(self, resource_group): + response = self.client.iot_hub_resource.delete_event_hub_consumer_group( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_iot_hub_resource_list_event_hub_consumer_groups(self, resource_group): + response = self.client.iot_hub_resource.list_event_hub_consumer_groups( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_iot_hub_resource_check_name_availability(self, resource_group): + response = self.client.iot_hub_resource.check_name_availability( + operation_inputs={"name": "str"}, ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py index 3c7bbd9cfeae..2ad8751d5510 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_iot_hub_resource_get(self, resource_group): response = await self.client.iot_hub_resource.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -102,8 +101,8 @@ async def test_iot_hub_resource_begin_create_or_update(self, resource_group): "minTlsVersion": "str", "networkRuleSets": { "applyToBuiltInEventHubEndpoint": bool, - "ipRules": [{"filterName": "str", "ipMask": "str", "action": "Allow"}], - "defaultAction": "Deny", + "ipRules": [{"filterName": "str", "ipMask": "str", "action": "str"}], + "defaultAction": "str", }, "privateEndpointConnections": [ { @@ -117,6 +116,14 @@ async def test_iot_hub_resource_begin_create_or_update(self, resource_group): }, "id": "str", "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -243,7 +250,6 @@ async def test_iot_hub_resource_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -258,7 +264,6 @@ async def test_iot_hub_resource_begin_update(self, resource_group): resource_group_name=resource_group.name, resource_name="str", iot_hub_tags={"tags": {"str": "str"}}, - api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -272,29 +277,17 @@ async def test_iot_hub_resource_begin_delete(self, resource_group): await self.client.iot_hub_resource.begin_delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_iot_hub_resource_list_by_subscription(self, resource_group): - response = self.client.iot_hub_resource.list_by_subscription( - api_version="2025-08-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_iot_hub_resource_list_by_resource_group(self, resource_group): response = self.client.iot_hub_resource.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -302,13 +295,9 @@ async def test_iot_hub_resource_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_iot_hub_resource_get_stats(self, resource_group): - response = await self.client.iot_hub_resource.get_stats( - resource_group_name=resource_group.name, - resource_name="str", - api_version="2025-08-01-preview", - ) - + async def test_iot_hub_resource_list_by_subscription(self, resource_group): + response = self.client.iot_hub_resource.list_by_subscription() + result = [r async for r in response] # please add some check logic here by yourself # ... @@ -318,75 +307,17 @@ async def test_iot_hub_resource_get_valid_skus(self, resource_group): response = self.client.iot_hub_resource.get_valid_skus( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_iot_hub_resource_list_event_hub_consumer_groups(self, resource_group): - response = self.client.iot_hub_resource.list_event_hub_consumer_groups( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_iot_hub_resource_get_event_hub_consumer_group(self, resource_group): - response = await self.client.iot_hub_resource.get_event_hub_consumer_group( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_iot_hub_resource_create_event_hub_consumer_group(self, resource_group): - response = await self.client.iot_hub_resource.create_event_hub_consumer_group( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - name="str", - consumer_group_body={"properties": {"name": "str"}}, - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_iot_hub_resource_delete_event_hub_consumer_group(self, resource_group): - response = await self.client.iot_hub_resource.delete_event_hub_consumer_group( - resource_group_name=resource_group.name, - resource_name="str", - event_hub_endpoint_name="str", - name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_iot_hub_resource_list_jobs(self, resource_group): response = self.client.iot_hub_resource.list_jobs( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -399,7 +330,6 @@ async def test_iot_hub_resource_get_job(self, resource_group): resource_group_name=resource_group.name, resource_name="str", job_id="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -411,7 +341,6 @@ async def test_iot_hub_resource_get_quota_metrics(self, resource_group): response = self.client.iot_hub_resource.get_quota_metrics( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -423,23 +352,11 @@ async def test_iot_hub_resource_get_endpoint_health(self, resource_group): response = self.client.iot_hub_resource.get_endpoint_health( resource_group_name=resource_group.name, iot_hub_name="str", - api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_iot_hub_resource_check_name_availability(self, resource_group): - response = await self.client.iot_hub_resource.check_name_availability( - operation_inputs={"name": "str"}, - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_iot_hub_resource_test_all_routes(self, resource_group): @@ -451,7 +368,6 @@ async def test_iot_hub_resource_test_all_routes(self, resource_group): "routingSource": "str", "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -474,7 +390,6 @@ async def test_iot_hub_resource_test_route(self, resource_group): "message": {"appProperties": {"str": "str"}, "body": "str", "systemProperties": {"str": "str"}}, "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -486,7 +401,6 @@ async def test_iot_hub_resource_list_keys(self, resource_group): response = self.client.iot_hub_resource.list_keys( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -499,7 +413,6 @@ async def test_iot_hub_resource_get_keys_for_key_name(self, resource_group): resource_group_name=resource_group.name, resource_name="str", key_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -520,7 +433,6 @@ async def test_iot_hub_resource_export_devices(self, resource_group): "identity": {"userAssignedIdentity": "str"}, "includeConfigurations": bool, }, - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -542,7 +454,79 @@ async def test_iot_hub_resource_import_devices(self, resource_group): "inputBlobName": "str", "outputBlobName": "str", }, - api_version="2025-08-01-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_iot_hub_resource_get_stats(self, resource_group): + response = await self.client.iot_hub_resource.get_stats( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_iot_hub_resource_get_event_hub_consumer_group(self, resource_group): + response = await self.client.iot_hub_resource.get_event_hub_consumer_group( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_iot_hub_resource_create_event_hub_consumer_group(self, resource_group): + response = await self.client.iot_hub_resource.create_event_hub_consumer_group( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + name="str", + consumer_group_body={"properties": {"name": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_iot_hub_resource_delete_event_hub_consumer_group(self, resource_group): + response = await self.client.iot_hub_resource.delete_event_hub_consumer_group( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_iot_hub_resource_list_event_hub_consumer_groups(self, resource_group): + response = self.client.iot_hub_resource.list_event_hub_consumer_groups( + resource_group_name=resource_group.name, + resource_name="str", + event_hub_endpoint_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_iot_hub_resource_check_name_availability(self, resource_group): + response = await self.client.iot_hub_resource.check_name_availability( + operation_inputs={"name": "str"}, ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py index 9d983041c2eb..9d58ba359055 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2025-08-01-preview", - ) + response = self.client.operations.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py index 8b017907bb3f..9a8f8067fdfa 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2025-08-01-preview", - ) + response = self.client.operations.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py index 36e001827a1c..78cf3c5d5913 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestIotHubPrivateEndpointConnectionsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(IotHubClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_private_endpoint_connections_list(self, resource_group): - response = self.client.private_endpoint_connections.list( - resource_group_name=resource_group.name, - resource_name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_private_endpoint_connections_get(self, resource_group): @@ -37,7 +25,6 @@ def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -61,9 +48,16 @@ def test_private_endpoint_connections_begin_update(self, resource_group): }, "id": "str", "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -76,8 +70,18 @@ def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_private_endpoint_connections_list(self, resource_group): + response = self.client.private_endpoint_connections.list( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py index 2331aa89be0a..a67771dffd87 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestIotHubPrivateEndpointConnectionsOperationsAsync(AzureMgmtRecordedTestC def setup_method(self, method): self.client = self.create_mgmt_client(IotHubClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_private_endpoint_connections_list(self, resource_group): - response = await self.client.private_endpoint_connections.list( - resource_group_name=resource_group.name, - resource_name="str", - api_version="2025-08-01-preview", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_private_endpoint_connections_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -63,9 +50,16 @@ async def test_private_endpoint_connections_begin_update(self, resource_group): }, "id": "str", "name": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -80,9 +74,19 @@ async def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_private_endpoint_connections_list(self, resource_group): + response = await self.client.private_endpoint_connections.list( + resource_group_name=resource_group.name, + resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py index f0c508b87b9b..fbdaf38dd91f 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_private_link_resources_list(self, resource_group): - response = self.client.private_link_resources.list( + def test_private_link_resources_get(self, resource_group): + response = self.client.private_link_resources.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", + group_id="str", ) # please add some check logic here by yourself @@ -32,12 +32,10 @@ def test_private_link_resources_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_private_link_resources_get(self, resource_group): - response = self.client.private_link_resources.get( + def test_private_link_resources_list(self, resource_group): + response = self.client.private_link_resources.list( resource_group_name=resource_group.name, resource_name="str", - group_id="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py index eb3fbe96e1a8..a99d8bce1c17 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_private_link_resources_list(self, resource_group): - response = await self.client.private_link_resources.list( + async def test_private_link_resources_get(self, resource_group): + response = await self.client.private_link_resources.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-08-01-preview", + group_id="str", ) # please add some check logic here by yourself @@ -33,12 +33,10 @@ async def test_private_link_resources_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_private_link_resources_get(self, resource_group): - response = await self.client.private_link_resources.get( + async def test_private_link_resources_list(self, resource_group): + response = await self.client.private_link_resources.list( resource_group_name=resource_group.name, resource_name="str", - group_id="str", - api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py index cf5f321b26c6..2c7b94832ed9 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_resource_provider_common_get_subscription_quota(self, resource_group): - response = self.client.resource_provider_common.get_subscription_quota( - api_version="2025-08-01-preview", - ) + response = self.client.resource_provider_common.get_subscription_quota() # please add some check logic here by yourself # ... diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py index 04b823113e38..fd3bed8a2e3d 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_resource_provider_common_get_subscription_quota(self, resource_group): - response = await self.client.resource_provider_common.get_subscription_quota( - api_version="2025-08-01-preview", - ) + response = await self.client.resource_provider_common.get_subscription_quota() # please add some check logic here by yourself # ... diff --git a/sdk/iothub/azure-mgmt-iothub/pyproject.toml b/sdk/iothub/azure-mgmt-iothub/pyproject.toml index d3b1e615945b..1fcc083852f4 100644 --- a/sdk/iothub/azure-mgmt-iothub/pyproject.toml +++ b/sdk/iothub/azure-mgmt-iothub/pyproject.toml @@ -29,7 +29,7 @@ keywords = [ "azure sdk", ] dependencies = [ - "msrest>=0.7.1", + "isodate>=0.6.1", "azure-mgmt-core>=1.6.0", "typing-extensions>=4.6.0", ] @@ -54,8 +54,8 @@ content-type = "text/markdown" [tool.setuptools.packages.find] exclude = [ "tests*", - "samples*", "generated_tests*", + "samples*", "generated_samples*", "doc*", "azure", diff --git a/sdk/iothub/azure-mgmt-iothub/tsp-location.yaml b/sdk/iothub/azure-mgmt-iothub/tsp-location.yaml new file mode 100644 index 000000000000..fc71adb86f06 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/iothub/resource-manager/Microsoft.Devices/IoTHub +commit: eed20b7102f5d73a459f37d2a4b1ed0faa5e8574 +repo: Azure/azure-rest-api-specs +additionalDirectories: