diff --git a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md index ac01f61a2a7f..493b06cfadca 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-09-22) + +- 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/README.md b/sdk/iothub/azure-resourcemanager-iothub/README.md index 9bb6e9adc46e..4239c3672556 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/README.md +++ b/sdk/iothub/azure-resourcemanager-iothub/README.md @@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on ## Examples -[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iothub/azure-resourcemanager-iothub/SAMPLE.md) ## Troubleshooting 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 5b86a65f5f09..7cc543ac5fd2 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/models/EventHubConsumerGroupInfoInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java index ee5bb394fea5..36a93adaf459 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/models/ArmIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java index 32e27c25e82a..c6e8c95006bc 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 b1ca9bfa255e..ceb8fe77120d 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 f91d7887c257..a3d2d00f0112 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 4254c12506ff..77f43a06514c 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 c23bc804c905..000000000000 --- 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 1ab96a116439..000000000000 --- 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 27a54b68b19d..000000000000 --- 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/CertificatesCreateOrUpdateSamples.java deleted file mode 100644 index 48ff39391753..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesCreateOrUpdateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.resourcemanager.iothub.models.CertificateProperties; - -/** Samples for Certificates CreateOrUpdate. */ -public final class CertificatesCreateOrUpdateSamples { - /** - * Sample code: Certificates_CreateOrUpdate. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void certificatesCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .certificates() - .define("cert") - .withExistingIotHub("myResourceGroup", "iothub") - .withProperties(new CertificateProperties().withCertificate("############################################")) - .create(); - } -} 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/CertificatesDeleteSamples.java deleted file mode 100644 index c63f4bc7db63..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for Certificates Delete. */ -public final class CertificatesDeleteSamples { - /** - * Sample code: Certificates_Delete. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void certificatesDelete(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/CertificatesGenerateVerificationCodeSamples.java deleted file mode 100644 index 87884082a729..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGenerateVerificationCodeSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for Certificates GenerateVerificationCode. */ -public final class CertificatesGenerateVerificationCodeSamples { - /** - * Sample code: Certificates_GenerateVerificationCode. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void certificatesGenerateVerificationCode( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/CertificatesGetSamples.java deleted file mode 100644 index 2d3fcc9a1b85..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesGetSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for Certificates Get. */ -public final class CertificatesGetSamples { - /** - * Sample code: Certificates_Get. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void certificatesGet(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/CertificatesListByIotHubSamples.java deleted file mode 100644 index 0702493857de..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesListByIotHubSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for Certificates ListByIotHub. */ -public final class CertificatesListByIotHubSamples { - /** - * Sample code: Certificates_ListByIotHub. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void certificatesListByIotHub(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/CertificatesVerifySamples.java deleted file mode 100644 index 44507e396bd0..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/CertificatesVerifySamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription; - -/** Samples for Certificates Verify. */ -public final class CertificatesVerifySamples { - /** - * Sample code: Certificates_Verify. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void certificatesVerify(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .certificates() - .verifyWithResponse( - "myResourceGroup", - "myFirstProvisioningService", - "cert", - "AAAAAAAADGk=", - new CertificateVerificationDescription().withCertificate("#####################################"), - Context.NONE); - } -} 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/IotHubManualFailoverSamples.java deleted file mode 100644 index 0f76dff0cd36..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubManualFailoverSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.iothub.models.FailoverInput; - -/** Samples for IotHub ManualFailover. */ -public final class IotHubManualFailoverSamples { - /** - * Sample code: IotHub_ManualFailover. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubManualFailover(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/IotHubResourceCheckNameAvailabilitySamples.java deleted file mode 100644 index f6f6b5be5bc0..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.iothub.models.OperationInputs; - -/** Samples for IotHubResource CheckNameAvailability. */ -public final class IotHubResourceCheckNameAvailabilitySamples { - /** - * Sample code: IotHubResource_CheckNameAvailability. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceCheckNameAvailability( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/IotHubResourceCreateEventHubConsumerGroupSamples.java deleted file mode 100644 index c50e2884405f..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateEventHubConsumerGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName; - -/** Samples for IotHubResource CreateEventHubConsumerGroup. */ -public final class IotHubResourceCreateEventHubConsumerGroupSamples { - /** - * Sample code: IotHubResource_CreateEventHubConsumerGroup. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceCreateEventHubConsumerGroup( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .iotHubResources() - .defineEventHubConsumerGroup("test") - .withExistingEventHubEndpoint("myResourceGroup", "testHub", "events") - .withProperties(new EventHubConsumerGroupName().withName("test")) - .create(); - } -} 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/IotHubResourceCreateOrUpdateSamples.java deleted file mode 100644 index b77ef5aa7937..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceCreateOrUpdateSamples.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -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 { - /** - * Sample code: IotHubResource_CreateOrUpdate. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceCreateOrUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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; - } -} 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/IotHubResourceDeleteEventHubConsumerGroupSamples.java deleted file mode 100644 index cc42e7222886..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteEventHubConsumerGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource DeleteEventHubConsumerGroup. */ -public final class IotHubResourceDeleteEventHubConsumerGroupSamples { - /** - * Sample code: IotHubResource_DeleteEventHubConsumerGroup. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceDeleteEventHubConsumerGroup( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/IotHubResourceDeleteSamples.java deleted file mode 100644 index d4305995d5b6..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource Delete. */ -public final class IotHubResourceDeleteSamples { - /** - * Sample code: IotHubResource_Delete. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceDelete(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceExportDevicesSamples.java deleted file mode 100644 index a2e7872284ec..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceExportDevicesSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.iothub.models.ExportDevicesRequest; - -/** Samples for IotHubResource ExportDevices. */ -public final class IotHubResourceExportDevicesSamples { - /** - * Sample code: IotHubResource_ExportDevices. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceExportDevices(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .iotHubResources() - .exportDevicesWithResponse( - "myResourceGroup", - "testHub", - new ExportDevicesRequest().withExportBlobContainerUri("testBlob").withExcludeKeys(true), - Context.NONE); - } -} 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/IotHubResourceGetByResourceGroupSamples.java deleted file mode 100644 index 1ed1d58717f0..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetByResourceGroupSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetByResourceGroup. */ -public final class IotHubResourceGetByResourceGroupSamples { - /** - * Sample code: IotHubResource_Get. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceGet(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceGetEndpointHealthSamples.java deleted file mode 100644 index 295a8e98f9a7..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEndpointHealthSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetEndpointHealth. */ -public final class IotHubResourceGetEndpointHealthSamples { - /** - * Sample code: IotHubResource_GetEndpointHealth. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceGetEndpointHealth(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceGetEventHubConsumerGroupSamples.java deleted file mode 100644 index 64f4f96019c7..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetEventHubConsumerGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetEventHubConsumerGroup. */ -public final class IotHubResourceGetEventHubConsumerGroupSamples { - /** - * Sample code: IotHubResource_ListEventHubConsumerGroups. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceListEventHubConsumerGroups( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/IotHubResourceGetJobSamples.java deleted file mode 100644 index 7486f17a7555..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetJobSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetJob. */ -public final class IotHubResourceGetJobSamples { - /** - * Sample code: IotHubResource_GetJob. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceGetJob(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceGetKeysForKeyNameSamples.java deleted file mode 100644 index 8dcde0eb8bdb..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetKeysForKeyNameSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetKeysForKeyName. */ -public final class IotHubResourceGetKeysForKeyNameSamples { - /** - * Sample code: IotHubResource_GetKeysForKeyName. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceGetKeysForKeyName(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/IotHubResourceGetQuotaMetricsSamples.java deleted file mode 100644 index 76c998ca2d6a..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetQuotaMetricsSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetQuotaMetrics. */ -public final class IotHubResourceGetQuotaMetricsSamples { - /** - * Sample code: IotHubResource_GetQuotaMetrics. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceGetQuotaMetrics(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceGetStatsSamples.java deleted file mode 100644 index 7e621f73854a..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetStatsSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetStats. */ -public final class IotHubResourceGetStatsSamples { - /** - * Sample code: IotHubResource_GetStats. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceGetStats(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceGetValidSkusSamples.java deleted file mode 100644 index 3bd52d0650f6..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceGetValidSkusSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource GetValidSkus. */ -public final class IotHubResourceGetValidSkusSamples { - /** - * Sample code: IotHubResource_GetValidSkus. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceGetValidSkus(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceImportDevicesSamples.java deleted file mode 100644 index f5e5f5191b3a..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceImportDevicesSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.iothub.models.ImportDevicesRequest; - -/** Samples for IotHubResource ImportDevices. */ -public final class IotHubResourceImportDevicesSamples { - /** - * Sample code: IotHubResource_ImportDevices. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceImportDevices(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .iotHubResources() - .importDevicesWithResponse( - "myResourceGroup", - "testHub", - new ImportDevicesRequest().withInputBlobContainerUri("testBlob").withOutputBlobContainerUri("testBlob"), - Context.NONE); - } -} 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/IotHubResourceListByResourceGroupSamples.java deleted file mode 100644 index 9794c68b7e5c..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListByResourceGroupSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource ListByResourceGroup. */ -public final class IotHubResourceListByResourceGroupSamples { - /** - * Sample code: IotHubResource_ListByResourceGroup. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceListByResourceGroup(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceListEventHubConsumerGroupsSamples.java deleted file mode 100644 index 2935df9511f0..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListEventHubConsumerGroupsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource ListEventHubConsumerGroups. */ -public final class IotHubResourceListEventHubConsumerGroupsSamples { - /** - * Sample code: IotHubResource_ListEventHubConsumerGroups. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceListEventHubConsumerGroups( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/IotHubResourceListJobsSamples.java deleted file mode 100644 index 9f9189486628..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListJobsSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource ListJobs. */ -public final class IotHubResourceListJobsSamples { - /** - * Sample code: IotHubResource_ListJobs. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceListJobs(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceListKeysSamples.java deleted file mode 100644 index ec5d46cb37fe..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListKeysSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource ListKeys. */ -public final class IotHubResourceListKeysSamples { - /** - * Sample code: IotHubResource_ListKeys. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceListKeys(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceListSamples.java deleted file mode 100644 index ec790fd166b8..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for IotHubResource List. */ -public final class IotHubResourceListSamples { - /** - * Sample code: IotHubResource_ListBySubscription. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceListBySubscription(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/IotHubResourceTestAllRoutesSamples.java deleted file mode 100644 index 484db2551108..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestAllRoutesSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -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 { - /** - * Sample code: IotHubResource_TestAllRoutes. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceTestAllRoutes(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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; - } -} 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/IotHubResourceTestRouteSamples.java deleted file mode 100644 index d497a03203cf..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceTestRouteSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -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 { - /** - * Sample code: IotHubResource_TestRoute. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceTestRoute(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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; - } -} 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/IotHubResourceUpdateSamples.java deleted file mode 100644 index 17954f98bb9f..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/IotHubResourceUpdateSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -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 { - /** - * Sample code: IotHubResource_Update. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void iotHubResourceUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - IotHubDescription resource = - iotHubManager - .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; - } -} 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/OperationsListSamples.java deleted file mode 100644 index 3d4939b57565..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/OperationsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /** - * Sample code: Operations_List. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void operationsList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index 342fc9aa1eba..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { - /** - * Sample code: PrivateEndpointConnection_Delete. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void privateEndpointConnectionDelete(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index a06bfcc81844..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { - /** - * Sample code: PrivateEndpointConnection_Get. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void privateEndpointConnectionGet(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index 7c3cfad469fd..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { - /** - * Sample code: PrivateEndpointConnections_List. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void privateEndpointConnectionsList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/PrivateEndpointConnectionsUpdateSamples.java deleted file mode 100644 index 3d53b21e49dc..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateEndpointConnectionsUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -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 { - /** - * Sample code: PrivateEndpointConnection_Update. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void privateEndpointConnectionUpdate(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .privateEndpointConnections() - .update( - "myResourceGroup", - "testHub", - "myPrivateEndpointConnection", - new PrivateEndpointConnectionInner() - .withProperties( - new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("Approved by johndoe@contoso.com"))), - Context.NONE); - } -} 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/PrivateLinkResourcesOperationGetSamples.java deleted file mode 100644 index e036c409e126..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResourcesOperation Get. */ -public final class PrivateLinkResourcesOperationGetSamples { - /** - * Sample code: PrivateLinkResources_List. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager - .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/PrivateLinkResourcesOperationListSamples.java deleted file mode 100644 index c7c74de63bb0..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/PrivateLinkResourcesOperationListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResourcesOperation List. */ -public final class PrivateLinkResourcesOperationListSamples { - /** - * Sample code: PrivateLinkResources_List. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void privateLinkResourcesList(com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.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/ResourceProviderCommonGetSubscriptionQuotaSamples.java deleted file mode 100644 index 2ba9a097bfe3..000000000000 --- a/sdk/iothub/azure-resourcemanager-iothub/src/samples/java/com/azure/resourcemanager/iothub/ResourceProviderCommonGetSubscriptionQuotaSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.iothub; - -import com.azure.core.util.Context; - -/** Samples for ResourceProviderCommon GetSubscriptionQuota. */ -public final class ResourceProviderCommonGetSubscriptionQuotaSamples { - /** - * Sample code: ResourceProviderCommon_GetSubscriptionQuota. - * - * @param iotHubManager Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure - * subscription. - */ - public static void resourceProviderCommonGetSubscriptionQuota( - com.azure.resourcemanager.iothub.IotHubManager iotHubManager) { - iotHubManager.resourceProviderCommons().getSubscriptionQuotaWithResponse(Context.NONE); - } -}