diff --git a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md index ac01f61a2a7fb..37d9c0b8c8cc4 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md +++ b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.0.0-beta.1 (2021-10-19) + +- Azure Resource Manager IotHub client library for Java. This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + ## 1.1.0 (2021-08-30) - Add support for new service API version 2021-07-01 diff --git a/sdk/iothub/azure-resourcemanager-iothub/SAMPLE.md b/sdk/iothub/azure-resourcemanager-iothub/SAMPLE.md index 515fcb4b42904..0258469bc7597 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/SAMPLE.md +++ b/sdk/iothub/azure-resourcemanager-iothub/SAMPLE.md @@ -1,61 +1,1116 @@ # Code snippets and samples -### Certificates - -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesDeleteSamples.java) -- [GenerateVerificationCode](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGenerateVerificationCodeSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGetSamples.java) -- [ListByIotHub](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesListByIotHubSamples.java) -- [Verify](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesVerifySamples.java) - -### IotHub - -- [ManualFailover](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubManualFailoverSamples.java) - -### IotHubResource - -- [CheckNameAvailability](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCheckNameAvailabilitySamples.java) -- [CreateEventHubConsumerGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateEventHubConsumerGroupSamples.java) -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteSamples.java) -- [DeleteEventHubConsumerGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteEventHubConsumerGroupSamples.java) -- [ExportDevices](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceExportDevicesSamples.java) -- [GetByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetByResourceGroupSamples.java) -- [GetEndpointHealth](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEndpointHealthSamples.java) -- [GetEventHubConsumerGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEventHubConsumerGroupSamples.java) -- [GetJob](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetJobSamples.java) -- [GetKeysForKeyName](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetKeysForKeyNameSamples.java) -- [GetQuotaMetrics](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetQuotaMetricsSamples.java) -- [GetStats](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetStatsSamples.java) -- [GetValidSkus](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetValidSkusSamples.java) -- [ImportDevices](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceImportDevicesSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListSamples.java) -- [ListByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListByResourceGroupSamples.java) -- [ListEventHubConsumerGroups](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListEventHubConsumerGroupsSamples.java) -- [ListJobs](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListJobsSamples.java) -- [ListKeys](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListKeysSamples.java) -- [TestAllRoutes](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestAllRoutesSamples.java) -- [TestRoute](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestRouteSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceUpdateSamples.java) - -### Operations - -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/OperationsListSamples.java) - -### PrivateEndpointConnections - -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsUpdateSamples.java) - -### PrivateLinkResourcesOperation - -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationListSamples.java) - -### ResourceProviderCommon - -- [GetSubscriptionQuota](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/ResourceProviderCommonGetSubscriptionQuotaSamples.java) +## Certificates + +- [CreateOrUpdate](#certificates_createorupdate) +- [Delete](#certificates_delete) +- [GenerateVerificationCode](#certificates_generateverificationcode) +- [Get](#certificates_get) +- [ListByIotHub](#certificates_listbyiothub) +- [Verify](#certificates_verify) + +## IotHub + +- [ManualFailover](#iothub_manualfailover) + +## IotHubResource + +- [CheckNameAvailability](#iothubresource_checknameavailability) +- [CreateEventHubConsumerGroup](#iothubresource_createeventhubconsumergroup) +- [CreateOrUpdate](#iothubresource_createorupdate) +- [Delete](#iothubresource_delete) +- [DeleteEventHubConsumerGroup](#iothubresource_deleteeventhubconsumergroup) +- [ExportDevices](#iothubresource_exportdevices) +- [GetByResourceGroup](#iothubresource_getbyresourcegroup) +- [GetEndpointHealth](#iothubresource_getendpointhealth) +- [GetEventHubConsumerGroup](#iothubresource_geteventhubconsumergroup) +- [GetJob](#iothubresource_getjob) +- [GetKeysForKeyName](#iothubresource_getkeysforkeyname) +- [GetQuotaMetrics](#iothubresource_getquotametrics) +- [GetStats](#iothubresource_getstats) +- [GetValidSkus](#iothubresource_getvalidskus) +- [ImportDevices](#iothubresource_importdevices) +- [List](#iothubresource_list) +- [ListByResourceGroup](#iothubresource_listbyresourcegroup) +- [ListEventHubConsumerGroups](#iothubresource_listeventhubconsumergroups) +- [ListJobs](#iothubresource_listjobs) +- [ListKeys](#iothubresource_listkeys) +- [TestAllRoutes](#iothubresource_testallroutes) +- [TestRoute](#iothubresource_testroute) +- [Update](#iothubresource_update) + +## Operations + +- [List](#operations_list) + +## PrivateEndpointConnections + +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) +- [Update](#privateendpointconnections_update) + +## PrivateLinkResourcesOperation + +- [Get](#privatelinkresourcesoperation_get) +- [List](#privatelinkresourcesoperation_list) + +## ResourceProviderCommon + +- [GetSubscriptionQuota](#resourceprovidercommon_getsubscriptionquota) +### Certificates_CreateOrUpdate + +```java +import com.azure.resourcemanager.iothub.models.CertificateProperties; + +/** Samples for Certificates CreateOrUpdate. */ +public final class CertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_certificatescreateorupdate.json + */ + /** + * Sample code: Certificates_CreateOrUpdate. + * + * @param manager Entry point to IotHubManager. + */ + public static void certificatesCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .certificates() + .define("cert") + .withExistingIotHub("myResourceGroup", "iothub") + .withProperties(new CertificateProperties().withCertificate("############################################")) + .create(); + } +} +``` + +### Certificates_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates Delete. */ +public final class CertificatesDeleteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_certificatesdelete.json + */ + /** + * Sample code: Certificates_Delete. + * + * @param manager Entry point to IotHubManager. + */ + public static void certificatesDelete(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.certificates().deleteWithResponse("myResourceGroup", "myhub", "cert", "AAAAAAAADGk=", Context.NONE); + } +} +``` + +### Certificates_GenerateVerificationCode + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates GenerateVerificationCode. */ +public final class CertificatesGenerateVerificationCodeSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_generateverificationcode.json + */ + /** + * Sample code: Certificates_GenerateVerificationCode. + * + * @param manager Entry point to IotHubManager. + */ + public static void certificatesGenerateVerificationCode(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .certificates() + .generateVerificationCodeWithResponse("myResourceGroup", "testHub", "cert", "AAAAAAAADGk=", Context.NONE); + } +} +``` + +### Certificates_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates Get. */ +public final class CertificatesGetSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getcertificate.json + */ + /** + * Sample code: Certificates_Get. + * + * @param manager Entry point to IotHubManager. + */ + public static void certificatesGet(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.certificates().getWithResponse("myResourceGroup", "testhub", "cert", Context.NONE); + } +} +``` + +### Certificates_ListByIotHub + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates ListByIotHub. */ +public final class CertificatesListByIotHubSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listcertificates.json + */ + /** + * Sample code: Certificates_ListByIotHub. + * + * @param manager Entry point to IotHubManager. + */ + public static void certificatesListByIotHub(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.certificates().listByIotHubWithResponse("myResourceGroup", "testhub", Context.NONE); + } +} +``` + +### Certificates_Verify + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription; + +/** Samples for Certificates Verify. */ +public final class CertificatesVerifySamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_certverify.json + */ + /** + * Sample code: Certificates_Verify. + * + * @param manager Entry point to IotHubManager. + */ + public static void certificatesVerify(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .certificates() + .verifyWithResponse( + "myResourceGroup", + "myFirstProvisioningService", + "cert", + "AAAAAAAADGk=", + new CertificateVerificationDescription().withCertificate("#####################################"), + Context.NONE); + } +} +``` + +### IotHub_ManualFailover + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.FailoverInput; + +/** Samples for IotHub ManualFailover. */ +public final class IotHubManualFailoverSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/IotHub_ManualFailover.json + */ + /** + * Sample code: IotHub_ManualFailover. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubManualFailover(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubs() + .manualFailover( + "testHub", "myResourceGroup", new FailoverInput().withFailoverRegion("testHub"), Context.NONE); + } +} +``` + +### IotHubResource_CheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.OperationInputs; + +/** Samples for IotHubResource CheckNameAvailability. */ +public final class IotHubResourceCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/checkNameAvailability.json + */ + /** + * Sample code: IotHubResource_CheckNameAvailability. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceCheckNameAvailability(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .checkNameAvailabilityWithResponse(new OperationInputs().withName("test-request"), Context.NONE); + } +} +``` + +### IotHubResource_CreateEventHubConsumerGroup + +```java +import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName; + +/** Samples for IotHubResource CreateEventHubConsumerGroup. */ +public final class IotHubResourceCreateEventHubConsumerGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_createconsumergroup.json + */ + /** + * Sample code: IotHubResource_CreateEventHubConsumerGroup. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceCreateEventHubConsumerGroup( + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .defineEventHubConsumerGroup("test") + .withExistingEventHubEndpoint("myResourceGroup", "testHub", "events") + .withProperties(new EventHubConsumerGroupName().withName("test")) + .create(); + } +} +``` + +### IotHubResource_CreateOrUpdate + +```java +import com.azure.resourcemanager.iothub.models.Capabilities; +import com.azure.resourcemanager.iothub.models.CloudToDeviceProperties; +import com.azure.resourcemanager.iothub.models.DefaultAction; +import com.azure.resourcemanager.iothub.models.EventHubProperties; +import com.azure.resourcemanager.iothub.models.FallbackRouteProperties; +import com.azure.resourcemanager.iothub.models.FeedbackProperties; +import com.azure.resourcemanager.iothub.models.IotHubProperties; +import com.azure.resourcemanager.iothub.models.IotHubSku; +import com.azure.resourcemanager.iothub.models.IotHubSkuInfo; +import com.azure.resourcemanager.iothub.models.MessagingEndpointProperties; +import com.azure.resourcemanager.iothub.models.NetworkRuleIpAction; +import com.azure.resourcemanager.iothub.models.NetworkRuleSetIpRule; +import com.azure.resourcemanager.iothub.models.NetworkRuleSetProperties; +import com.azure.resourcemanager.iothub.models.RoutingEndpoints; +import com.azure.resourcemanager.iothub.models.RoutingProperties; +import com.azure.resourcemanager.iothub.models.RoutingSource; +import com.azure.resourcemanager.iothub.models.StorageEndpointProperties; +import java.time.Duration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for IotHubResource CreateOrUpdate. */ +public final class IotHubResourceCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_createOrUpdate.json + */ + /** + * Sample code: IotHubResource_CreateOrUpdate. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .define("testHub") + .withRegion("centraluseuap") + .withExistingResourceGroup("myResourceGroup") + .withSku(new IotHubSkuInfo().withName(IotHubSku.S1).withCapacity(1L)) + .withTags(mapOf()) + .withEtag("AAAAAAFD6M4=") + .withProperties( + new IotHubProperties() + .withIpFilterRules(Arrays.asList()) + .withNetworkRuleSets( + new NetworkRuleSetProperties() + .withDefaultAction(DefaultAction.DENY) + .withApplyToBuiltInEventHubEndpoint(true) + .withIpRules( + Arrays + .asList( + new NetworkRuleSetIpRule() + .withFilterName("rule1") + .withAction(NetworkRuleIpAction.ALLOW) + .withIpMask("131.117.159.53"), + new NetworkRuleSetIpRule() + .withFilterName("rule2") + .withAction(NetworkRuleIpAction.ALLOW) + .withIpMask("157.55.59.128/25")))) + .withMinTlsVersion("1.2") + .withEventHubEndpoints( + mapOf("events", new EventHubProperties().withRetentionTimeInDays(1L).withPartitionCount(2))) + .withRouting( + new RoutingProperties() + .withEndpoints( + new RoutingEndpoints() + .withServiceBusQueues(Arrays.asList()) + .withServiceBusTopics(Arrays.asList()) + .withEventHubs(Arrays.asList()) + .withStorageContainers(Arrays.asList())) + .withRoutes(Arrays.asList()) + .withFallbackRoute( + new FallbackRouteProperties() + .withName("$fallback") + .withSource(RoutingSource.DEVICE_MESSAGES) + .withCondition("true") + .withEndpointNames(Arrays.asList("events")) + .withIsEnabled(true))) + .withStorageEndpoints( + mapOf( + "$default", + new StorageEndpointProperties() + .withSasTtlAsIso8601(Duration.parse("PT1H")) + .withConnectionString("") + .withContainerName(""))) + .withMessagingEndpoints( + mapOf( + "fileNotifications", + new MessagingEndpointProperties() + .withLockDurationAsIso8601(Duration.parse("PT1M")) + .withTtlAsIso8601(Duration.parse("PT1H")) + .withMaxDeliveryCount(10))) + .withEnableFileUploadNotifications(false) + .withCloudToDevice( + new CloudToDeviceProperties() + .withMaxDeliveryCount(10) + .withDefaultTtlAsIso8601(Duration.parse("PT1H")) + .withFeedback( + new FeedbackProperties() + .withLockDurationAsIso8601(Duration.parse("PT1M")) + .withTtlAsIso8601(Duration.parse("PT1H")) + .withMaxDeliveryCount(10))) + .withFeatures(Capabilities.NONE)) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### IotHubResource_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource Delete. */ +public final class IotHubResourceDeleteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_delete.json + */ + /** + * Sample code: IotHubResource_Delete. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceDelete(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().delete("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_DeleteEventHubConsumerGroup + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource DeleteEventHubConsumerGroup. */ +public final class IotHubResourceDeleteEventHubConsumerGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_deleteconsumergroup.json + */ + /** + * Sample code: IotHubResource_DeleteEventHubConsumerGroup. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceDeleteEventHubConsumerGroup( + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .deleteEventHubConsumerGroupWithResponse("myResourceGroup", "testHub", "events", "test", Context.NONE); + } +} +``` + +### IotHubResource_ExportDevices + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.ExportDevicesRequest; + +/** Samples for IotHubResource ExportDevices. */ +public final class IotHubResourceExportDevicesSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_exportdevices.json + */ + /** + * Sample code: IotHubResource_ExportDevices. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceExportDevices(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .exportDevicesWithResponse( + "myResourceGroup", + "testHub", + new ExportDevicesRequest().withExportBlobContainerUri("testBlob").withExcludeKeys(true), + Context.NONE); + } +} +``` + +### IotHubResource_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetByResourceGroup. */ +public final class IotHubResourceGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_get.json + */ + /** + * Sample code: IotHubResource_Get. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceGet(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getByResourceGroupWithResponse("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_GetEndpointHealth + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetEndpointHealth. */ +public final class IotHubResourceGetEndpointHealthSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_routingendpointhealth.json + */ + /** + * Sample code: IotHubResource_GetEndpointHealth. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceGetEndpointHealth(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getEndpointHealth("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_GetEventHubConsumerGroup + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetEventHubConsumerGroup. */ +public final class IotHubResourceGetEventHubConsumerGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getconsumergroup.json + */ + /** + * Sample code: IotHubResource_ListEventHubConsumerGroups. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceListEventHubConsumerGroups( + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .getEventHubConsumerGroupWithResponse("myResourceGroup", "testHub", "events", "test", Context.NONE); + } +} +``` + +### IotHubResource_GetJob + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetJob. */ +public final class IotHubResourceGetJobSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getjob.json + */ + /** + * Sample code: IotHubResource_GetJob. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceGetJob(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getJobWithResponse("myResourceGroup", "testHub", "test", Context.NONE); + } +} +``` + +### IotHubResource_GetKeysForKeyName + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetKeysForKeyName. */ +public final class IotHubResourceGetKeysForKeyNameSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getkey.json + */ + /** + * Sample code: IotHubResource_GetKeysForKeyName. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceGetKeysForKeyName(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .getKeysForKeyNameWithResponse("myResourceGroup", "testHub", "iothubowner", Context.NONE); + } +} +``` + +### IotHubResource_GetQuotaMetrics + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetQuotaMetrics. */ +public final class IotHubResourceGetQuotaMetricsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_quotametrics.json + */ + /** + * Sample code: IotHubResource_GetQuotaMetrics. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceGetQuotaMetrics(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getQuotaMetrics("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_GetStats + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetStats. */ +public final class IotHubResourceGetStatsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_stats.json + */ + /** + * Sample code: IotHubResource_GetStats. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceGetStats(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getStatsWithResponse("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_GetValidSkus + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource GetValidSkus. */ +public final class IotHubResourceGetValidSkusSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getskus.json + */ + /** + * Sample code: IotHubResource_GetValidSkus. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceGetValidSkus(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getValidSkus("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_ImportDevices + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.ImportDevicesRequest; + +/** Samples for IotHubResource ImportDevices. */ +public final class IotHubResourceImportDevicesSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_importdevices.json + */ + /** + * Sample code: IotHubResource_ImportDevices. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceImportDevices(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .importDevicesWithResponse( + "myResourceGroup", + "testHub", + new ImportDevicesRequest().withInputBlobContainerUri("testBlob").withOutputBlobContainerUri("testBlob"), + Context.NONE); + } +} +``` + +### IotHubResource_List + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource List. */ +public final class IotHubResourceListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listbysubscription.json + */ + /** + * Sample code: IotHubResource_ListBySubscription. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceListBySubscription(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().list(Context.NONE); + } +} +``` + +### IotHubResource_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource ListByResourceGroup. */ +public final class IotHubResourceListByResourceGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listbyrg.json + */ + /** + * Sample code: IotHubResource_ListByResourceGroup. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceListByResourceGroup(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listByResourceGroup("myResourceGroup", Context.NONE); + } +} +``` + +### IotHubResource_ListEventHubConsumerGroups + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource ListEventHubConsumerGroups. */ +public final class IotHubResourceListEventHubConsumerGroupsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listehgroups.json + */ + /** + * Sample code: IotHubResource_ListEventHubConsumerGroups. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceListEventHubConsumerGroups( + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listEventHubConsumerGroups("myResourceGroup", "testHub", "events", Context.NONE); + } +} +``` + +### IotHubResource_ListJobs + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource ListJobs. */ +public final class IotHubResourceListJobsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listjobs.json + */ + /** + * Sample code: IotHubResource_ListJobs. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceListJobs(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listJobs("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_ListKeys + +```java +import com.azure.core.util.Context; + +/** Samples for IotHubResource ListKeys. */ +public final class IotHubResourceListKeysSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listkeys.json + */ + /** + * Sample code: IotHubResource_ListKeys. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceListKeys(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listKeys("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### IotHubResource_TestAllRoutes + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.RoutingMessage; +import com.azure.resourcemanager.iothub.models.RoutingSource; +import com.azure.resourcemanager.iothub.models.TestAllRoutesInput; +import java.util.HashMap; +import java.util.Map; + +/** Samples for IotHubResource TestAllRoutes. */ +public final class IotHubResourceTestAllRoutesSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_testallroutes.json + */ + /** + * Sample code: IotHubResource_TestAllRoutes. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceTestAllRoutes(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .testAllRoutesWithResponse( + "testHub", + "myResourceGroup", + new TestAllRoutesInput() + .withRoutingSource(RoutingSource.DEVICE_MESSAGES) + .withMessage( + new RoutingMessage() + .withBody("Body of message") + .withAppProperties(mapOf("key1", "value1")) + .withSystemProperties(mapOf("key1", "value1"))), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### IotHubResource_TestRoute + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.RouteProperties; +import com.azure.resourcemanager.iothub.models.RoutingMessage; +import com.azure.resourcemanager.iothub.models.RoutingSource; +import com.azure.resourcemanager.iothub.models.TestRouteInput; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for IotHubResource TestRoute. */ +public final class IotHubResourceTestRouteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_testnewroute.json + */ + /** + * Sample code: IotHubResource_TestRoute. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceTestRoute(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .iotHubResources() + .testRouteWithResponse( + "testHub", + "myResourceGroup", + new TestRouteInput() + .withMessage( + new RoutingMessage() + .withBody("Body of message") + .withAppProperties(mapOf("key1", "value1")) + .withSystemProperties(mapOf("key1", "value1"))) + .withRoute( + new RouteProperties() + .withName("Routeid") + .withSource(RoutingSource.DEVICE_MESSAGES) + .withEndpointNames(Arrays.asList("id1")) + .withIsEnabled(true)), + Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### IotHubResource_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.models.IotHubDescription; +import java.util.HashMap; +import java.util.Map; + +/** Samples for IotHubResource Update. */ +public final class IotHubResourceUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_patch.json + */ + /** + * Sample code: IotHubResource_Update. + * + * @param manager Entry point to IotHubManager. + */ + public static void iotHubResourceUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { + IotHubDescription resource = + manager + .iotHubResources() + .getByResourceGroupWithResponse("myResourceGroup", "myHub", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("foo", "bar")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_operations.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to IotHubManager. + */ + public static void operationsList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_deleteprivateendpointconnection.json + */ + /** + * Sample code: PrivateEndpointConnection_Delete. + * + * @param manager Entry point to IotHubManager. + */ + public static void privateEndpointConnectionDelete(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .privateEndpointConnections() + .delete("myResourceGroup", "testHub", "myPrivateEndpointConnection", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getprivateendpointconnection.json + */ + /** + * Sample code: PrivateEndpointConnection_Get. + * + * @param manager Entry point to IotHubManager. + */ + public static void privateEndpointConnectionGet(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .privateEndpointConnections() + .getWithResponse("myResourceGroup", "testHub", "myPrivateEndpointConnection", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections List. */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listprivateendpointconnections.json + */ + /** + * Sample code: PrivateEndpointConnections_List. + * + * @param manager Entry point to IotHubManager. + */ + public static void privateEndpointConnectionsList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.privateEndpointConnections().listWithResponse("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.iothub.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.iothub.models.PrivateLinkServiceConnectionStatus; + +/** Samples for PrivateEndpointConnections Update. */ +public final class PrivateEndpointConnectionsUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_updateprivateendpointconnection.json + */ + /** + * Sample code: PrivateEndpointConnection_Update. + * + * @param manager Entry point to IotHubManager. + */ + public static void privateEndpointConnectionUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager + .privateEndpointConnections() + .update( + "myResourceGroup", + "testHub", + "myPrivateEndpointConnection", + new PrivateEndpointConnectionInner() + .withProperties( + new PrivateEndpointConnectionProperties() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) + .withDescription("Approved by johndoe@contoso.com"))), + Context.NONE); + } +} +``` + +### PrivateLinkResourcesOperation_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResourcesOperation Get. */ +public final class PrivateLinkResourcesOperationGetSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getprivatelinkresources.json + */ + /** + * Sample code: PrivateLinkResources_List. + * + * @param manager Entry point to IotHubManager. + */ + public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.privateLinkResourcesOperations().getWithResponse("myResourceGroup", "testHub", "iotHub", Context.NONE); + } +} +``` + +### PrivateLinkResourcesOperation_List + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResourcesOperation List. */ +public final class PrivateLinkResourcesOperationListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listprivatelinkresources.json + */ + /** + * Sample code: PrivateLinkResources_List. + * + * @param manager Entry point to IotHubManager. + */ + public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.privateLinkResourcesOperations().listWithResponse("myResourceGroup", "testHub", Context.NONE); + } +} +``` + +### ResourceProviderCommon_GetSubscriptionQuota + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceProviderCommon GetSubscriptionQuota. */ +public final class ResourceProviderCommonGetSubscriptionQuotaSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_usages.json + */ + /** + * Sample code: ResourceProviderCommon_GetSubscriptionQuota. + * + * @param manager Entry point to IotHubManager. + */ + public static void resourceProviderCommonGetSubscriptionQuota( + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.resourceProviderCommons().getSubscriptionQuotaWithResponse(Context.NONE); + } +} +``` + diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java index 5b86a65f5f09b..7cc543ac5fd2f 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java @@ -194,7 +194,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi .append("-") .append("com.azure.resourcemanager.iothub") .append("/") - .append("1.1.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java index 611befd840b7c..796784354ef07 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java @@ -79,7 +79,7 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, String ifMatch); @@ -101,7 +101,7 @@ SyncPoller, IotHubDescriptionInner> beginCrea * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, @@ -186,7 +186,7 @@ IotHubDescriptionInner createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IotHubDescriptionInner> beginUpdate( String resourceGroupName, String resourceName, TagsResource iotHubTags); @@ -202,7 +202,7 @@ SyncPoller, IotHubDescriptionInner> beginUpda * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IotHubDescriptionInner> beginUpdate( String resourceGroupName, String resourceName, TagsResource iotHubTags, Context context); @@ -247,7 +247,7 @@ IotHubDescriptionInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IotHubDescriptionInner> beginDelete( String resourceGroupName, String resourceName); @@ -263,7 +263,7 @@ SyncPoller, IotHubDescriptionInner> beginDele * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IotHubDescriptionInner> beginDelete( String resourceGroupName, String resourceName, Context context); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java index 70bc77d461df8..65f2f27e4ef39 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java @@ -27,7 +27,7 @@ public interface IotHubsClient { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginManualFailover( String iotHubName, String resourceGroupName, FailoverInput failoverInput); @@ -46,7 +46,7 @@ SyncPoller, Void> beginManualFailover( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginManualFailover( String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java index 7563b1837ebf7..87e4fb20f118d 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java @@ -91,7 +91,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String resourceName, @@ -112,7 +112,7 @@ SyncPoller, PrivateEndpointConnection * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String resourceName, @@ -174,7 +174,7 @@ PrivateEndpointConnectionInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginDelete( String resourceGroupName, String resourceName, String privateEndpointConnectionName); @@ -191,7 +191,7 @@ SyncPoller, PrivateEndpointConnection * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginDelete( String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java index ee5bb394fea54..36a93adaf459d 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java @@ -8,6 +8,7 @@ import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -20,6 +21,7 @@ public final class EventHubConsumerGroupInfoInner extends ProxyResource { * The tags. */ @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; /* diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java index 1b0e088be46a5..da2f93f7a0402 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java @@ -817,7 +817,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, String ifMatch) { Mono>> mono = @@ -849,7 +849,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, @@ -885,7 +885,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, String ifMatch) { return beginCreateOrUpdateAsync(resourceGroupName, resourceName, iotHubDescription, ifMatch).getSyncPoller(); @@ -908,7 +908,7 @@ public SyncPoller, IotHubDescriptionInner> be * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, @@ -1184,7 +1184,7 @@ private Mono>> updateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginUpdateAsync( String resourceGroupName, String resourceName, TagsResource iotHubTags) { Mono>> mono = updateWithResponseAsync(resourceGroupName, resourceName, iotHubTags); @@ -1210,7 +1210,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginUpdateAsync( String resourceGroupName, String resourceName, TagsResource iotHubTags, Context context) { context = this.client.mergeContext(context); @@ -1237,7 +1237,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IotHubDescriptionInner> beginUpdate( String resourceGroupName, String resourceName, TagsResource iotHubTags) { return beginUpdateAsync(resourceGroupName, resourceName, iotHubTags).getSyncPoller(); @@ -1255,7 +1255,7 @@ public SyncPoller, IotHubDescriptionInner> be * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IotHubDescriptionInner> beginUpdate( String resourceGroupName, String resourceName, TagsResource iotHubTags, Context context) { return beginUpdateAsync(resourceGroupName, resourceName, iotHubTags, context).getSyncPoller(); @@ -1437,7 +1437,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginDeleteAsync( String resourceGroupName, String resourceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); @@ -1462,7 +1462,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginDeleteAsync( String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); @@ -1487,7 +1487,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IotHubDescriptionInner> beginDelete( String resourceGroupName, String resourceName) { return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); @@ -1504,7 +1504,7 @@ public SyncPoller, IotHubDescriptionInner> be * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the description of the IoT hub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IotHubDescriptionInner> beginDelete( String resourceGroupName, String resourceName, Context context) { return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java index d42e8e128b89b..9f6be24949fa3 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java @@ -201,7 +201,7 @@ private Mono>> manualFailoverWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginManualFailoverAsync( String iotHubName, String resourceGroupName, FailoverInput failoverInput) { Mono>> mono = @@ -225,7 +225,7 @@ private PollerFlux, Void> beginManualFailoverAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginManualFailoverAsync( String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context) { context = this.client.mergeContext(context); @@ -249,7 +249,7 @@ private PollerFlux, Void> beginManualFailoverAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginManualFailover( String iotHubName, String resourceGroupName, FailoverInput failoverInput) { return beginManualFailoverAsync(iotHubName, resourceGroupName, failoverInput).getSyncPoller(); @@ -269,7 +269,7 @@ public SyncPoller, Void> beginManualFailover( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginManualFailover( String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context) { return beginManualFailoverAsync(iotHubName, resourceGroupName, failoverInput, context).getSyncPoller(); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java index 513136f571370..43bbc34b01fca 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java @@ -598,7 +598,7 @@ private Mono>> updateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( String resourceGroupName, String resourceName, @@ -630,7 +630,7 @@ private PollerFlux, PrivateEndpointCo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( String resourceGroupName, String resourceName, @@ -663,7 +663,7 @@ private PollerFlux, PrivateEndpointCo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String resourceName, @@ -687,7 +687,7 @@ public SyncPoller, PrivateEndpointCon * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String resourceName, @@ -917,7 +917,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginDeleteAsync( String resourceGroupName, String resourceName, String privateEndpointConnectionName) { Mono>> mono = @@ -944,7 +944,7 @@ private PollerFlux, PrivateEndpointCo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginDeleteAsync( String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); @@ -971,7 +971,7 @@ private PollerFlux, PrivateEndpointCo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginDelete( String resourceGroupName, String resourceName, String privateEndpointConnectionName) { return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).getSyncPoller(); @@ -989,7 +989,7 @@ public SyncPoller, PrivateEndpointCon * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private endpoint connection of an IotHub. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginDelete( String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java index 32e27c25e82ae..c6e8c95006bcb 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -40,6 +41,7 @@ public class ArmIdentity { * Dictionary of */ @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java index b1ca9bfa255e5..ceb8fe77120d0 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java @@ -9,6 +9,7 @@ import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.iothub.fluent.models.SharedAccessSignatureAuthorizationRuleInner; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -114,6 +115,7 @@ public final class IotHubProperties { * while making create or update calls for the IoT hub. */ @JsonProperty(value = "eventHubEndpoints") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map eventHubEndpoints; /* @@ -132,6 +134,7 @@ public final class IotHubProperties { * an error to be thrown. */ @JsonProperty(value = "storageEndpoints") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map storageEndpoints; /* @@ -139,6 +142,7 @@ public final class IotHubProperties { * queue. */ @JsonProperty(value = "messagingEndpoints") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map messagingEndpoints; /* diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java index f91d7887c2574..a3d2d00f01124 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -25,12 +26,14 @@ public final class RoutingMessage { * App properties */ @JsonProperty(value = "appProperties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map appProperties; /* * System properties */ @JsonProperty(value = "systemProperties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map systemProperties; /** diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java index 4254c12506ffc..77f43a06514c5 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -19,6 +20,7 @@ public final class TagsResource { * Resource tags */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/Constants.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/Constants.java deleted file mode 100644 index c23bc804c9059..0000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/Constants.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.management.Region; -import com.azure.resourcemanager.iothub.models.IotHubSku; -import com.azure.resourcemanager.iothub.models.IotHubSkuInfo; - -public class Constants -{ - static final String DEFAULT_INSTANCE_NAME = "JavaIotHubControlPlaneSDKTest"; - static final Region DEFAULT_REGION = Region.US_WEST_CENTRAL; - - public static class DefaultSku - { - static final String NAME = "S1"; - static final Long CAPACITY = 1L; - static IotHubSkuInfo INSTANCE = new IotHubSkuInfo() - .withCapacity(Constants.DefaultSku.CAPACITY) - .withName(IotHubSku.fromString(Constants.DefaultSku.NAME)); - } -} diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/IotHubResourceManagementTests.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/IotHubResourceManagementTests.java deleted file mode 100644 index 1ab96a1164393..0000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/IotHubResourceManagementTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.test.annotation.DoNotRecord; -import com.azure.core.util.Context; -import com.azure.resourcemanager.iothub.fluent.models.IotHubDescriptionInner; -import com.azure.resourcemanager.iothub.models.ErrorDetailsException; -import com.azure.resourcemanager.iothub.models.IotHubDescription; -import com.azure.resourcemanager.iothub.models.IotHubSkuInfo; -import com.azure.resourcemanager.resources.ResourceManager; -import com.azure.resourcemanager.resources.models.ResourceGroup; -import org.junit.jupiter.api.Test; - -import static com.azure.resourcemanager.iothub.Constants.DEFAULT_INSTANCE_NAME; -import static com.azure.resourcemanager.iothub.Constants.DEFAULT_REGION; -import static org.junit.jupiter.api.Assertions.*; - -public class IotHubResourceManagementTests extends IotHubTestBase { - @Test - @DoNotRecord(skipInPlayback = true) - public void ServiceCRUD() { - ResourceManager resourceManager = createResourceManager(); - IotHubManager iotHubManager = createIotHubManager(); - ResourceGroup resourceGroup = createResourceGroup(resourceManager); - - String serviceName = DEFAULT_INSTANCE_NAME + "-" + createRandomSuffix(); - - try { - // Define the IoT Hub - IotHubDescription createServiceDescription = iotHubManager - .iotHubResources() - .define(serviceName) - .withRegion(DEFAULT_REGION) - .withExistingResourceGroup(resourceGroup.name()) - .withSku(Constants.DefaultSku.INSTANCE) - .create(); - - // Deploy the IoT Hub - IotHubDescriptionInner updatedIotHubServiceDescriptionInner = - iotHubManager - .serviceClient() - .getIotHubResources() - .createOrUpdate(resourceGroup.name(), serviceName, createServiceDescription.innerModel()); - - // Verify that the deployed IoT Hub has the expected SKU and name - assertNotNull(updatedIotHubServiceDescriptionInner); - assertEquals(Constants.DefaultSku.NAME, updatedIotHubServiceDescriptionInner.sku().name().toString()); - assertEquals(serviceName, updatedIotHubServiceDescriptionInner.name()); - - // Try getting the newly created resource - IotHubDescription getResponse = iotHubManager - .iotHubResources() - .getByResourceGroup(resourceGroup.name(), serviceName); - - assertNotNull(getResponse); - assertNotNull(getResponse.etag()); - assertEquals(Constants.DefaultSku.INSTANCE.name().toString(), getResponse.sku().name().toString()); - assertEquals(Constants.DefaultSku.INSTANCE.capacity().longValue(), getResponse.sku().capacity().longValue()); - assertEquals(DEFAULT_REGION.toString(), getResponse.location()); - - // Delete the service - iotHubManager.iotHubResources().delete(resourceGroup.name(), serviceName, Context.NONE); - } finally { - // No matter if the test fails or not, delete the resource group that contains these test resources - resourceManager.resourceGroups().beginDeleteByName(resourceGroup.name()); - } - } - - @Test - @DoNotRecord(skipInPlayback = true) - public void updateSKU() { - ResourceManager resourceManager = createResourceManager(); - IotHubManager iotHubManager = createIotHubManager(); - ResourceGroup resourceGroup = createResourceGroup(resourceManager); - - try { - // Deploy an IoT Hub - IotHubDescriptionInner iotHubDescription = - createIotHub(iotHubManager, resourceGroup); - - // locally increase the SKU capacity by 1 - long expectedSkuCapacity = iotHubDescription.sku().capacity() + 1; - IotHubSkuInfo newSku = - iotHubDescription - .sku() - .withCapacity(expectedSkuCapacity); - - // update the service representation to use the new SKU - iotHubDescription = iotHubManager - .serviceClient() - .getIotHubResources() - .createOrUpdate( - resourceGroup.name(), - iotHubDescription.name(), - iotHubDescription.withSku(newSku)); - - // verify that the returned IoT Hub description has the new capacity - assertEquals(expectedSkuCapacity, iotHubDescription.sku().capacity()); - } finally { - // No matter if the test fails or not, delete the resource group that contains these test resources - resourceManager.resourceGroups().beginDeleteByName(resourceGroup.name()); - } - } - - @Test - @DoNotRecord(skipInPlayback = true) - public void CreateFailure() { - ResourceManager resourceManager = createResourceManager(); - IotHubManager iotHubManager = createIotHubManager(); - ResourceGroup resourceGroup = createResourceGroup(resourceManager); - - try { - iotHubManager - .iotHubResources() - .define("some invalid service name *&^-#2?") - .withRegion(DEFAULT_REGION) - .withExistingResourceGroup(resourceGroup.name()) - .withSku(Constants.DefaultSku.INSTANCE) - .create(); - - fail("Creating an IoT hub with an invalid name should have thrown an exception"); - } catch (ErrorDetailsException ex) { - // expected throw - } finally { - // No matter if the test fails or not, delete the resource group that contains these test resources - resourceManager.resourceGroups().beginDeleteByName(resourceGroup.name()); - } - } -} diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/IotHubTestBase.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/IotHubTestBase.java deleted file mode 100644 index 27a54b68b19d7..0000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/test/com/azure/resourcemanager/iothub/IotHubTestBase.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.TestBase; -import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.resourcemanager.iothub.fluent.models.IotHubDescriptionInner; -import com.azure.resourcemanager.iothub.models.IotHubDescription; -import com.azure.resourcemanager.resources.ResourceManager; -import com.azure.resourcemanager.resources.models.ResourceGroup; - -import java.util.UUID; - -import static com.azure.resourcemanager.iothub.Constants.DEFAULT_INSTANCE_NAME; -import static com.azure.resourcemanager.iothub.Constants.DEFAULT_REGION; - -public class IotHubTestBase extends TestBase { - public ResourceManager createResourceManager() { - return ResourceManager - .authenticate(new DefaultAzureCredentialBuilder().build(), new AzureProfile(AzureEnvironment.AZURE)) - .withDefaultSubscription(); - } - - public ResourceGroup createResourceGroup(ResourceManager resourceManager) { - String resourceGroupName = DEFAULT_INSTANCE_NAME + "-" + createRandomSuffix(); - return resourceManager.resourceGroups() - .define(resourceGroupName) - .withRegion(DEFAULT_REGION) - .create(); - } - - public IotHubManager createIotHubManager() { - return IotHubManager - .authenticate(new DefaultAzureCredentialBuilder().build(), new AzureProfile(AzureEnvironment.AZURE)); - } - - public IotHubDescriptionInner createIotHub(IotHubManager iotHubManager, ResourceGroup resourceGroup) { - String serviceName = DEFAULT_INSTANCE_NAME + "-" + createRandomSuffix(); - - IotHubDescription iotHubDescription = iotHubManager - .iotHubResources() - .define(serviceName) - .withRegion(DEFAULT_REGION) - .withExistingResourceGroup(resourceGroup.name()) - .withSku(Constants.DefaultSku.INSTANCE) - .create(); - - IotHubDescriptionInner inner = iotHubManager - .serviceClient() - .getIotHubResources() - .createOrUpdate(resourceGroup.name(), serviceName, iotHubDescription.innerModel()); - - return inner; - } - - public String createRandomSuffix() { - // need to shorten the UUID since max service name is 50 characters - return UUID.randomUUID().toString().substring(0, 18); - } -} diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesCreateOrUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateSamples.java similarity index 69% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesCreateOrUpdateSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateSamples.java index 48ff393917534..78002e8d9bd93 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesCreateOrUpdateSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesCreateOrUpdateSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.resourcemanager.iothub.models.CertificateProperties; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_certificatescreateorupdate.json + */ /** * Sample code: Certificates_CreateOrUpdate. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void certificatesCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void certificatesCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .certificates() .define("cert") .withExistingIotHub("myResourceGroup", "iothub") diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesDeleteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteSamples.java similarity index 50% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesDeleteSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteSamples.java index c63f4bc7db634..6dd73fb9cedc1 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesDeleteSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesDeleteSamples.java @@ -2,21 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_certificatesdelete.json + */ /** * Sample code: Certificates_Delete. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void certificatesDelete(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .certificates() - .deleteWithResponse("myResourceGroup", "myhub", "cert", "AAAAAAAADGk=", Context.NONE); + public static void certificatesDelete(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.certificates().deleteWithResponse("myResourceGroup", "myhub", "cert", "AAAAAAAADGk=", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGenerateVerificationCodeSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGenerateVerificationCodeSamples.java similarity index 58% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGenerateVerificationCodeSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGenerateVerificationCodeSamples.java index 87884082a7290..98fea80b807d9 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGenerateVerificationCodeSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGenerateVerificationCodeSamples.java @@ -2,21 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for Certificates GenerateVerificationCode. */ public final class CertificatesGenerateVerificationCodeSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_generateverificationcode.json + */ /** * Sample code: Certificates_GenerateVerificationCode. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void certificatesGenerateVerificationCode( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void certificatesGenerateVerificationCode(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .certificates() .generateVerificationCodeWithResponse("myResourceGroup", "testHub", "cert", "AAAAAAAADGk=", Context.NONE); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGetSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGetSamples.java similarity index 51% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGetSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGetSamples.java index 2d3fcc9a1b858..f6b113b02d302 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGetSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesGetSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for Certificates Get. */ public final class CertificatesGetSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getcertificate.json + */ /** * Sample code: Certificates_Get. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void certificatesGet(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.certificates().getWithResponse("myResourceGroup", "testhub", "cert", Context.NONE); + public static void certificatesGet(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.certificates().getWithResponse("myResourceGroup", "testhub", "cert", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesListByIotHubSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubSamples.java similarity index 52% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesListByIotHubSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubSamples.java index 0702493857deb..68e4820fdf4e7 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesListByIotHubSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesListByIotHubSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for Certificates ListByIotHub. */ public final class CertificatesListByIotHubSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listcertificates.json + */ /** * Sample code: Certificates_ListByIotHub. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void certificatesListByIotHub(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.certificates().listByIotHubWithResponse("myResourceGroup", "testhub", Context.NONE); + public static void certificatesListByIotHub(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.certificates().listByIotHubWithResponse("myResourceGroup", "testhub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesVerifySamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifySamples.java similarity index 73% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesVerifySamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifySamples.java index 44507e396bd04..8bc59cc719c76 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesVerifySamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/CertificatesVerifySamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription; /** Samples for Certificates Verify. */ public final class CertificatesVerifySamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_certverify.json + */ /** * Sample code: Certificates_Verify. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void certificatesVerify(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void certificatesVerify(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .certificates() .verifyWithResponse( "myResourceGroup", diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubManualFailoverSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubManualFailoverSamples.java similarity index 67% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubManualFailoverSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubManualFailoverSamples.java index 0f76dff0cd362..3cf071ece6c64 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubManualFailoverSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubManualFailoverSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.FailoverInput; /** Samples for IotHub ManualFailover. */ public final class IotHubManualFailoverSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/IotHub_ManualFailover.json + */ /** * Sample code: IotHub_ManualFailover. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubManualFailover(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubManualFailover(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubs() .manualFailover( "testHub", "myResourceGroup", new FailoverInput().withFailoverRegion("testHub"), Context.NONE); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCheckNameAvailabilitySamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCheckNameAvailabilitySamples.java similarity index 61% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCheckNameAvailabilitySamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCheckNameAvailabilitySamples.java index f6f6b5be5bc05..7e78004c5864b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCheckNameAvailabilitySamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCheckNameAvailabilitySamples.java @@ -2,22 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.OperationInputs; /** Samples for IotHubResource CheckNameAvailability. */ public final class IotHubResourceCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/checkNameAvailability.json + */ /** * Sample code: IotHubResource_CheckNameAvailability. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceCheckNameAvailability( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubResourceCheckNameAvailability(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .checkNameAvailabilityWithResponse(new OperationInputs().withName("test-request"), Context.NONE); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateEventHubConsumerGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateEventHubConsumerGroupSamples.java similarity index 69% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateEventHubConsumerGroupSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateEventHubConsumerGroupSamples.java index c50e2884405f6..0a23dc9f94bc6 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateEventHubConsumerGroupSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateEventHubConsumerGroupSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName; /** Samples for IotHubResource CreateEventHubConsumerGroup. */ public final class IotHubResourceCreateEventHubConsumerGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_createconsumergroup.json + */ /** * Sample code: IotHubResource_CreateEventHubConsumerGroup. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ public static void iotHubResourceCreateEventHubConsumerGroup( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .defineEventHubConsumerGroup("test") .withExistingEventHubEndpoint("myResourceGroup", "testHub", "events") diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateOrUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateOrUpdateSamples.java similarity index 95% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateOrUpdateSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateOrUpdateSamples.java index b77ef5aa7937f..cddc44148a41d 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateOrUpdateSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.resourcemanager.iothub.models.Capabilities; import com.azure.resourcemanager.iothub.models.CloudToDeviceProperties; @@ -28,14 +28,16 @@ /** Samples for IotHubResource CreateOrUpdate. */ public final class IotHubResourceCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_createOrUpdate.json + */ /** * Sample code: IotHubResource_CreateOrUpdate. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubResourceCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .define("testHub") .withRegion("centraluseuap") diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteEventHubConsumerGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteEventHubConsumerGroupSamples.java similarity index 64% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteEventHubConsumerGroupSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteEventHubConsumerGroupSamples.java index cc42e72228865..0ee4a35bca2c1 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteEventHubConsumerGroupSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteEventHubConsumerGroupSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource DeleteEventHubConsumerGroup. */ public final class IotHubResourceDeleteEventHubConsumerGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_deleteconsumergroup.json + */ /** * Sample code: IotHubResource_DeleteEventHubConsumerGroup. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ public static void iotHubResourceDeleteEventHubConsumerGroup( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .deleteEventHubConsumerGroupWithResponse("myResourceGroup", "testHub", "events", "test", Context.NONE); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteSamples.java similarity index 53% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteSamples.java index d4305995d5b67..cdf1b19b4c042 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceDeleteSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource Delete. */ public final class IotHubResourceDeleteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_delete.json + */ /** * Sample code: IotHubResource_Delete. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceDelete(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().delete("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceDelete(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().delete("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceExportDevicesSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceExportDevicesSamples.java similarity index 71% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceExportDevicesSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceExportDevicesSamples.java index a2e7872284ece..61b2f843da3c8 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceExportDevicesSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceExportDevicesSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.ExportDevicesRequest; /** Samples for IotHubResource ExportDevices. */ public final class IotHubResourceExportDevicesSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_exportdevices.json + */ /** * Sample code: IotHubResource_ExportDevices. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceExportDevices(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubResourceExportDevices(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .exportDevicesWithResponse( "myResourceGroup", diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetByResourceGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetByResourceGroupSamples.java similarity index 53% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetByResourceGroupSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetByResourceGroupSamples.java index 1ed1d58717f00..9d2331a4332c4 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetByResourceGroupSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetByResourceGroupSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetByResourceGroup. */ public final class IotHubResourceGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_get.json + */ /** * Sample code: IotHubResource_Get. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceGet(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().getByResourceGroupWithResponse("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceGet(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getByResourceGroupWithResponse("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEndpointHealthSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEndpointHealthSamples.java similarity index 52% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEndpointHealthSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEndpointHealthSamples.java index 295a8e98f9a78..328cfa12da3db 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEndpointHealthSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEndpointHealthSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetEndpointHealth. */ public final class IotHubResourceGetEndpointHealthSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_routingendpointhealth.json + */ /** * Sample code: IotHubResource_GetEndpointHealth. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceGetEndpointHealth(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().getEndpointHealth("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceGetEndpointHealth(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getEndpointHealth("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEventHubConsumerGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEventHubConsumerGroupSamples.java similarity index 64% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEventHubConsumerGroupSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEventHubConsumerGroupSamples.java index 64f4f96019c7e..f001306a06881 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEventHubConsumerGroupSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetEventHubConsumerGroupSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetEventHubConsumerGroup. */ public final class IotHubResourceGetEventHubConsumerGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getconsumergroup.json + */ /** * Sample code: IotHubResource_ListEventHubConsumerGroups. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ public static void iotHubResourceListEventHubConsumerGroups( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .getEventHubConsumerGroupWithResponse("myResourceGroup", "testHub", "events", "test", Context.NONE); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetJobSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetJobSamples.java similarity index 51% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetJobSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetJobSamples.java index 7486f17a7555b..5eb56d092a350 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetJobSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetJobSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetJob. */ public final class IotHubResourceGetJobSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getjob.json + */ /** * Sample code: IotHubResource_GetJob. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceGetJob(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().getJobWithResponse("myResourceGroup", "testHub", "test", Context.NONE); + public static void iotHubResourceGetJob(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getJobWithResponse("myResourceGroup", "testHub", "test", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetKeysForKeyNameSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetKeysForKeyNameSamples.java similarity index 65% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetKeysForKeyNameSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetKeysForKeyNameSamples.java index 8dcde0eb8bdb8..29c84ef1d70d4 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetKeysForKeyNameSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetKeysForKeyNameSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetKeysForKeyName. */ public final class IotHubResourceGetKeysForKeyNameSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getkey.json + */ /** * Sample code: IotHubResource_GetKeysForKeyName. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceGetKeysForKeyName(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubResourceGetKeysForKeyName(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .getKeysForKeyNameWithResponse("myResourceGroup", "testHub", "iothubowner", Context.NONE); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetQuotaMetricsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetQuotaMetricsSamples.java similarity index 53% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetQuotaMetricsSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetQuotaMetricsSamples.java index 76c998ca2d6af..2de6c2ebaee59 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetQuotaMetricsSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetQuotaMetricsSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetQuotaMetrics. */ public final class IotHubResourceGetQuotaMetricsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_quotametrics.json + */ /** * Sample code: IotHubResource_GetQuotaMetrics. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceGetQuotaMetrics(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().getQuotaMetrics("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceGetQuotaMetrics(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getQuotaMetrics("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetStatsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetStatsSamples.java similarity index 52% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetStatsSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetStatsSamples.java index 7e621f73854a8..1ae4d1126580b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetStatsSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetStatsSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetStats. */ public final class IotHubResourceGetStatsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_stats.json + */ /** * Sample code: IotHubResource_GetStats. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceGetStats(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().getStatsWithResponse("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceGetStats(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getStatsWithResponse("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetValidSkusSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetValidSkusSamples.java similarity index 53% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetValidSkusSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetValidSkusSamples.java index 3bd52d0650f69..2ed2b83af15be 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetValidSkusSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceGetValidSkusSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource GetValidSkus. */ public final class IotHubResourceGetValidSkusSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getskus.json + */ /** * Sample code: IotHubResource_GetValidSkus. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceGetValidSkus(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().getValidSkus("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceGetValidSkus(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().getValidSkus("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceImportDevicesSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceImportDevicesSamples.java similarity index 71% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceImportDevicesSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceImportDevicesSamples.java index f5e5f5191b3ad..48a730b066d1b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceImportDevicesSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceImportDevicesSamples.java @@ -2,21 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.ImportDevicesRequest; /** Samples for IotHubResource ImportDevices. */ public final class IotHubResourceImportDevicesSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_importdevices.json + */ /** * Sample code: IotHubResource_ImportDevices. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceImportDevices(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubResourceImportDevices(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .importDevicesWithResponse( "myResourceGroup", diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListByResourceGroupSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListByResourceGroupSamples.java similarity index 54% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListByResourceGroupSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListByResourceGroupSamples.java index 9794c68b7e5c2..f8bb4a809732f 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListByResourceGroupSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListByResourceGroupSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource ListByResourceGroup. */ public final class IotHubResourceListByResourceGroupSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listbyrg.json + */ /** * Sample code: IotHubResource_ListByResourceGroup. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceListByResourceGroup(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().listByResourceGroup("myResourceGroup", Context.NONE); + public static void iotHubResourceListByResourceGroup(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listByResourceGroup("myResourceGroup", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListEventHubConsumerGroupsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListEventHubConsumerGroupsSamples.java similarity index 52% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListEventHubConsumerGroupsSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListEventHubConsumerGroupsSamples.java index 2935df9511f0c..b73937f2ca825 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListEventHubConsumerGroupsSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListEventHubConsumerGroupsSamples.java @@ -2,22 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource ListEventHubConsumerGroups. */ public final class IotHubResourceListEventHubConsumerGroupsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listehgroups.json + */ /** * Sample code: IotHubResource_ListEventHubConsumerGroups. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ public static void iotHubResourceListEventHubConsumerGroups( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .iotHubResources() - .listEventHubConsumerGroups("myResourceGroup", "testHub", "events", Context.NONE); + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listEventHubConsumerGroups("myResourceGroup", "testHub", "events", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListJobsSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListJobsSamples.java similarity index 53% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListJobsSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListJobsSamples.java index 9f91894866281..d93372848c10e 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListJobsSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListJobsSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource ListJobs. */ public final class IotHubResourceListJobsSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listjobs.json + */ /** * Sample code: IotHubResource_ListJobs. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceListJobs(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().listJobs("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceListJobs(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listJobs("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListKeysSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListKeysSamples.java similarity index 53% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListKeysSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListKeysSamples.java index ec5d46cb37fe1..2cb1f95b68fa4 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListKeysSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListKeysSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource ListKeys. */ public final class IotHubResourceListKeysSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listkeys.json + */ /** * Sample code: IotHubResource_ListKeys. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceListKeys(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().listKeys("myResourceGroup", "testHub", Context.NONE); + public static void iotHubResourceListKeys(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().listKeys("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListSamples.java similarity index 54% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListSamples.java index ec790fd166b81..a318cc8ac7580 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceListSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for IotHubResource List. */ public final class IotHubResourceListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listbysubscription.json + */ /** * Sample code: IotHubResource_ListBySubscription. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceListBySubscription(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.iotHubResources().list(Context.NONE); + public static void iotHubResourceListBySubscription(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.iotHubResources().list(Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestAllRoutesSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestAllRoutesSamples.java similarity index 83% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestAllRoutesSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestAllRoutesSamples.java index 484db25511086..730a056ee371e 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestAllRoutesSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestAllRoutesSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.RoutingMessage; @@ -13,14 +13,16 @@ /** Samples for IotHubResource TestAllRoutes. */ public final class IotHubResourceTestAllRoutesSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_testallroutes.json + */ /** * Sample code: IotHubResource_TestAllRoutes. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceTestAllRoutes(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubResourceTestAllRoutes(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .testAllRoutesWithResponse( "testHub", diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestRouteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestRouteSamples.java similarity index 86% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestRouteSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestRouteSamples.java index d497a03203cff..75078f4f6ad17 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestRouteSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceTestRouteSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.RouteProperties; @@ -15,14 +15,16 @@ /** Samples for IotHubResource TestRoute. */ public final class IotHubResourceTestRouteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_testnewroute.json + */ /** * Sample code: IotHubResource_TestRoute. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceTestRoute(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void iotHubResourceTestRoute(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .iotHubResources() .testRouteWithResponse( "testHub", diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceUpdateSamples.java similarity index 79% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceUpdateSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceUpdateSamples.java index 17954f98bb9ff..35532eef02373 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceUpdateSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/IotHubResourceUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.IotHubDescription; @@ -11,15 +11,17 @@ /** Samples for IotHubResource Update. */ public final class IotHubResourceUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_patch.json + */ /** * Sample code: IotHubResource_Update. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void iotHubResourceUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { + public static void iotHubResourceUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { IotHubDescription resource = - iotHubManager + manager .iotHubResources() .getByResourceGroupWithResponse("myResourceGroup", "myHub", Context.NONE) .getValue(); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/OperationsListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/OperationsListSamples.java similarity index 54% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/OperationsListSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/OperationsListSamples.java index 3d4939b57565c..4b4e4527ff8df 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/OperationsListSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/OperationsListSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_operations.json + */ /** * Sample code: Operations_List. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void operationsList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.operations().list(Context.NONE); + public static void operationsList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.operations().list(Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsDeleteSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteSamples.java similarity index 63% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsDeleteSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteSamples.java index 342fc9aa1ebaa..5e2e0da011d7d 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_deleteprivateendpointconnection.json + */ /** * Sample code: PrivateEndpointConnection_Delete. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void privateEndpointConnectionDelete(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void privateEndpointConnectionDelete(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .privateEndpointConnections() .delete("myResourceGroup", "testHub", "myPrivateEndpointConnection", Context.NONE); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsGetSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetSamples.java similarity index 64% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsGetSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetSamples.java index a06bfcc81844d..20d08db9b651a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsGetSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getprivateendpointconnection.json + */ /** * Sample code: PrivateEndpointConnection_Get. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void privateEndpointConnectionGet(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void privateEndpointConnectionGet(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .privateEndpointConnections() .getWithResponse("myResourceGroup", "testHub", "myPrivateEndpointConnection", Context.NONE); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListSamples.java similarity index 51% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsListSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListSamples.java index 7c3cfad469fd9..2e3aabdc3423c 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsListSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsListSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listprivateendpointconnections.json + */ /** * Sample code: PrivateEndpointConnections_List. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void privateEndpointConnectionsList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.privateEndpointConnections().listWithResponse("myResourceGroup", "testHub", Context.NONE); + public static void privateEndpointConnectionsList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.privateEndpointConnections().listWithResponse("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsUpdateSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateSamples.java similarity index 81% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsUpdateSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateSamples.java index 3d53b21e49dc5..02c9f28fb5a74 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner; @@ -12,14 +12,16 @@ /** Samples for PrivateEndpointConnections Update. */ public final class PrivateEndpointConnectionsUpdateSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_updateprivateendpointconnection.json + */ /** * Sample code: PrivateEndpointConnection_Update. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void privateEndpointConnectionUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager + public static void privateEndpointConnectionUpdate(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager .privateEndpointConnections() .update( "myResourceGroup", diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationGetSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationGetSamples.java similarity index 51% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationGetSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationGetSamples.java index e036c409e1268..73717b5a9e3b6 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationGetSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationGetSamples.java @@ -2,21 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for PrivateLinkResourcesOperation Get. */ public final class PrivateLinkResourcesOperationGetSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_getprivatelinkresources.json + */ /** * Sample code: PrivateLinkResources_List. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .privateLinkResourcesOperations() - .getWithResponse("myResourceGroup", "testHub", "iotHub", Context.NONE); + public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.privateLinkResourcesOperations().getWithResponse("myResourceGroup", "testHub", "iotHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationListSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationListSamples.java similarity index 52% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationListSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationListSamples.java index c7c74de63bb03..482eed3d8d32b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationListSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/PrivateLinkResourcesOperationListSamples.java @@ -2,19 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for PrivateLinkResourcesOperation List. */ public final class PrivateLinkResourcesOperationListSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_listprivatelinkresources.json + */ /** * Sample code: PrivateLinkResources_List. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ - public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.privateLinkResourcesOperations().listWithResponse("myResourceGroup", "testHub", Context.NONE); + public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.privateLinkResourcesOperations().listWithResponse("myResourceGroup", "testHub", Context.NONE); } } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/ResourceProviderCommonGetSubscriptionQuotaSamples.java b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonGetSubscriptionQuotaSamples.java similarity index 54% rename from sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/ResourceProviderCommonGetSubscriptionQuotaSamples.java rename to sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonGetSubscriptionQuotaSamples.java index 2ba9a097bfe30..3cf45a9281eec 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/ResourceProviderCommonGetSubscriptionQuotaSamples.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/generated/ResourceProviderCommonGetSubscriptionQuotaSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.iothub; +package com.azure.resourcemanager.iothub.generated; import com.azure.core.util.Context; /** Samples for ResourceProviderCommon GetSubscriptionQuota. */ public final class ResourceProviderCommonGetSubscriptionQuotaSamples { + /* + * x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-01/examples/iothub_usages.json + */ /** * Sample code: ResourceProviderCommon_GetSubscriptionQuota. * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. + * @param manager Entry point to IotHubManager. */ public static void resourceProviderCommonGetSubscriptionQuota( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.resourceProviderCommons().getSubscriptionQuotaWithResponse(Context.NONE); + com.azure.resourcemanager.iothub.IotHubManager manager) { + manager.resourceProviderCommons().getSubscriptionQuotaWithResponse(Context.NONE); } }