diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/CHANGELOG.md b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/CHANGELOG.md index f9b2384881a4..a5d086975efb 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/CHANGELOG.md +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-04-04) +- Azure Resource Manager HybridNetwork client library for Java. This package contains Microsoft Azure SDK for HybridNetwork Management SDK. The definitions in this swagger specification will be used to manage the Hybrid Network resources. Package tag package-2022-01-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-08-16) diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/README.md b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/README.md index 34171242ae6b..efd05f6fa0fd 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/README.md +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/README.md @@ -2,7 +2,7 @@ Azure Resource Manager HybridNetwork client library for Java. -This package contains Microsoft Azure SDK for HybridNetwork Management SDK. The definitions in this swagger specification will be used to manage the Hybrid Network resources. Package tag package-2021-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for HybridNetwork Management SDK. The definitions in this swagger specification will be used to manage the Hybrid Network resources. Package tag package-2022-01-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-hybridnetwork - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/SAMPLE.md b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/SAMPLE.md index 8dbf4b46d954..8532635019a3 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/SAMPLE.md +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/SAMPLE.md @@ -24,6 +24,7 @@ - [CreateOrUpdate](#networkfunctions_createorupdate) - [Delete](#networkfunctions_delete) +- [ExecuteRequest](#networkfunctions_executerequest) - [GetByResourceGroup](#networkfunctions_getbyresourcegroup) - [List](#networkfunctions_list) - [ListByResourceGroup](#networkfunctions_listbyresourcegroup) @@ -60,6 +61,7 @@ - [Delete](#vendorskus_delete) - [Get](#vendorskus_get) - [List](#vendorskus_list) +- [ListCredential](#vendorskus_listcredential) ## Vendors @@ -70,26 +72,18 @@ ### Devices_CreateOrUpdate ```java -import com.azure.core.management.SubResource; - /** Samples for Devices CreateOrUpdate. */ public final class DevicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceCreate.json + */ /** * Sample code: Create or update device. * * @param manager Entry point to HybridNetworkManager. */ public static void createOrUpdateDevice(com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { - manager - .devices() - .define("TestDevice") - .withRegion("eastus") - .withExistingResourceGroup("rg1") - .withAzureStackEdge( - new SubResource() - .withId( - "/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName")) - .create(); + manager.devices().define("TestDevice").withRegion("eastus").withExistingResourceGroup("rg1").create(); } } ``` @@ -101,6 +95,9 @@ import com.azure.core.util.Context; /** Samples for Devices Delete. */ public final class DevicesDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceDelete.json + */ /** * Sample code: Delete device resource. * @@ -119,6 +116,9 @@ import com.azure.core.util.Context; /** Samples for Devices GetByResourceGroup. */ public final class DevicesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceGet.json + */ /** * Sample code: Get device resource. * @@ -137,6 +137,9 @@ import com.azure.core.util.Context; /** Samples for Devices List. */ public final class DevicesListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceListBySubscription.json + */ /** * Sample code: List all devices in a subscription. * @@ -156,6 +159,9 @@ import com.azure.core.util.Context; /** Samples for Devices ListByResourceGroup. */ public final class DevicesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceListByResourceGroup.json + */ /** * Sample code: List all devices in resource group. * @@ -175,6 +181,9 @@ import com.azure.core.util.Context; /** Samples for Devices ListRegistrationKey. */ public final class DevicesListRegistrationKeySamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceListRegistrationKey.json + */ /** * Sample code: Get device registration key. * @@ -196,6 +205,9 @@ import java.util.Map; /** Samples for Devices UpdateTags. */ public final class DevicesUpdateTagsSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceUpdateTags.json + */ /** * Sample code: Update hybrid network device tags. * @@ -228,6 +240,9 @@ import com.azure.core.util.Context; /** Samples for NetworkFunctionVendorSkus ListBySku. */ public final class NetworkFunctionVendorSkusListBySkuSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionSkuDetailsGet.json + */ /** * Sample code: Get network function sku details. * @@ -247,6 +262,9 @@ import com.azure.core.util.Context; /** Samples for NetworkFunctionVendorSkus ListByVendor. */ public final class NetworkFunctionVendorSkusListByVendorSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionSkuListByVendor.json + */ /** * Sample code: List vendors and skus. * @@ -265,12 +283,16 @@ import com.azure.core.util.Context; /** Samples for NetworkFunctionVendors List. */ public final class NetworkFunctionVendorsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionVendorAndSkuListBySubscription.json + */ /** - * Sample code: List vendors and skus. + * Sample code: List vendors and skus by subscription. * * @param manager Entry point to HybridNetworkManager. */ - public static void listVendorsAndSkus(com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { + public static void listVendorsAndSkusBySubscription( + com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { manager.networkFunctionVendors().list(Context.NONE); } } @@ -293,6 +315,9 @@ import java.util.Arrays; /** Samples for NetworkFunctions CreateOrUpdate. */ public final class NetworkFunctionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionCreate.json + */ /** * Sample code: Create network function resource. * @@ -365,6 +390,9 @@ import com.azure.core.util.Context; /** Samples for NetworkFunctions Delete. */ public final class NetworkFunctionsDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionDelete.json + */ /** * Sample code: Delete network function resource. * @@ -377,6 +405,45 @@ public final class NetworkFunctionsDeleteSamples { } ``` +### NetworkFunctions_ExecuteRequest + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridnetwork.models.ExecuteRequestParameters; +import com.azure.resourcemanager.hybridnetwork.models.HttpMethod; +import com.azure.resourcemanager.hybridnetwork.models.RequestMetadata; + +/** Samples for NetworkFunctions ExecuteRequest. */ +public final class NetworkFunctionsExecuteRequestSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionsExecuteRequest.json + */ + /** + * Sample code: Send request to network function services. + * + * @param manager Entry point to HybridNetworkManager. + */ + public static void sendRequestToNetworkFunctionServices( + com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { + manager + .networkFunctions() + .executeRequest( + "rg", + "testNetworkfunction", + new ExecuteRequestParameters() + .withServiceEndpoint("serviceEndpoint") + .withRequestMetadata( + new RequestMetadata() + .withRelativePath("/simProfiles/testSimProfile") + .withHttpMethod(HttpMethod.POST) + .withSerializedBody( + "{\"subscriptionProfile\":\"ChantestSubscription15\",\"permanentKey\":\"00112233445566778899AABBCCDDEEFF\",\"opcOperatorCode\":\"63bfa50ee6523365ff14c1f45f88737d\",\"staticIpAddresses\":{\"internet\":{\"ipv4Addr\":\"198.51.100.1\",\"ipv6Prefix\":\"2001:db8:abcd:12::0/64\"},\"another_network\":{\"ipv6Prefix\":\"2001:111:cdef:22::0/64\"}}}") + .withApiVersion("apiVersionQueryString")), + Context.NONE); + } +} +``` + ### NetworkFunctions_GetByResourceGroup ```java @@ -384,6 +451,9 @@ import com.azure.core.util.Context; /** Samples for NetworkFunctions GetByResourceGroup. */ public final class NetworkFunctionsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionGet.json + */ /** * Sample code: Get network function resource. * @@ -403,6 +473,9 @@ import com.azure.core.util.Context; /** Samples for NetworkFunctions List. */ public final class NetworkFunctionsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionListBySubscription.json + */ /** * Sample code: List all network function resources in subscription. * @@ -422,6 +495,9 @@ import com.azure.core.util.Context; /** Samples for NetworkFunctions ListByResourceGroup. */ public final class NetworkFunctionsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionListByResourceGroup.json + */ /** * Sample code: List network function in resource group. * @@ -444,6 +520,9 @@ import java.util.Map; /** Samples for NetworkFunctions UpdateTags. */ public final class NetworkFunctionsUpdateTagsSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionUpdateTags.json + */ /** * Sample code: Update tags for network function resource. * @@ -476,6 +555,9 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/GetOperations.json + */ /** * Sample code: Get Registration Operations. * @@ -494,6 +576,9 @@ import com.azure.core.util.Context; /** Samples for RoleInstances Get. */ public final class RoleInstancesGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceGet.json + */ /** * Sample code: Get the operational state of role instance of vendor network function. * @@ -513,6 +598,9 @@ import com.azure.core.util.Context; /** Samples for RoleInstances List. */ public final class RoleInstancesListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceListByVendorNetworkFunction.json + */ /** * Sample code: List all role instances of vendor network function. * @@ -532,6 +620,9 @@ import com.azure.core.util.Context; /** Samples for RoleInstances Restart. */ public final class RoleInstancesRestartSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceRestart.json + */ /** * Sample code: Restart a role instance of a vendor network function. * @@ -551,6 +642,9 @@ import com.azure.core.util.Context; /** Samples for RoleInstances Start. */ public final class RoleInstancesStartSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceStart.json + */ /** * Sample code: Start a role instance of a vendor network function. * @@ -570,6 +664,9 @@ import com.azure.core.util.Context; /** Samples for RoleInstances Stop. */ public final class RoleInstancesStopSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceStop.json + */ /** * Sample code: Stop a role instance of a vendor network function. * @@ -600,6 +697,9 @@ import java.util.Arrays; /** Samples for VendorNetworkFunctions CreateOrUpdate. */ public final class VendorNetworkFunctionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorNfCreate.json + */ /** * Sample code: Create or update vendor network function sub resource. * @@ -675,6 +775,9 @@ import com.azure.core.util.Context; /** Samples for VendorNetworkFunctions Get. */ public final class VendorNetworkFunctionsGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorNfGet.json + */ /** * Sample code: Get vendor network function sub resource by service key of network function. * @@ -694,6 +797,9 @@ import com.azure.core.util.Context; /** Samples for VendorNetworkFunctions List. */ public final class VendorNetworkFunctionsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorNfListByVendor.json + */ /** * Sample code: List all nfs of vendor resource. * @@ -711,6 +817,9 @@ public final class VendorNetworkFunctionsListSamples { ```java /** Samples for VendorSkuPreview CreateOrUpdate. */ public final class VendorSkuPreviewCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewCreate.json + */ /** * Sample code: Create or update preview subscription of vendor sku sub resource. * @@ -730,6 +839,9 @@ import com.azure.core.util.Context; /** Samples for VendorSkuPreview Delete. */ public final class VendorSkuPreviewDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewDelete.json + */ /** * Sample code: Delete preview subscription of vendor sku sub resource. * @@ -749,6 +861,9 @@ import com.azure.core.util.Context; /** Samples for VendorSkuPreview Get. */ public final class VendorSkuPreviewGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewGet.json + */ /** * Sample code: Get preview subscription of vendor sku sub resource. * @@ -768,6 +883,9 @@ import com.azure.core.util.Context; /** Samples for VendorSkuPreview List. */ public final class VendorSkuPreviewListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewListBySku.json + */ /** * Sample code: List all preview subscriptions of vendor sku sub resource. * @@ -795,6 +913,7 @@ import com.azure.resourcemanager.hybridnetwork.models.LinuxConfiguration; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionRoleConfiguration; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionRoleConfigurationType; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionTemplate; +import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionType; import com.azure.resourcemanager.hybridnetwork.models.NetworkInterface; import com.azure.resourcemanager.hybridnetwork.models.NetworkInterfaceIpConfiguration; import com.azure.resourcemanager.hybridnetwork.models.OperatingSystemTypes; @@ -812,6 +931,9 @@ import java.util.Arrays; /** Samples for VendorSkus CreateOrUpdate. */ public final class VendorSkusCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuCreate.json + */ /** * Sample code: Create or update the sku of vendor resource. * @@ -824,6 +946,7 @@ public final class VendorSkusCreateOrUpdateSamples { .define("TestSku") .withExistingVendor("TestVendor") .withDeploymentMode(SkuDeploymentMode.PRIVATE_EDGE_ZONE) + .withNetworkFunctionType(NetworkFunctionType.VIRTUAL_NETWORK_FUNCTION) .withPreview(true) .withManagedApplicationTemplate( SerializerFactory @@ -922,6 +1045,9 @@ import com.azure.core.util.Context; /** Samples for VendorSkus Delete. */ public final class VendorSkusDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuDelete.json + */ /** * Sample code: Delete the sku of vendor resource. * @@ -941,6 +1067,9 @@ import com.azure.core.util.Context; /** Samples for VendorSkus Get. */ public final class VendorSkusGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuGet.json + */ /** * Sample code: Get the sku of vendor resource. * @@ -959,6 +1088,9 @@ import com.azure.core.util.Context; /** Samples for VendorSkus List. */ public final class VendorSkusListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuListByVendor.json + */ /** * Sample code: List all the vendor skus of vendor resource. * @@ -971,11 +1103,36 @@ public final class VendorSkusListSamples { } ``` +### VendorSkus_ListCredential + +```java +import com.azure.core.util.Context; + +/** Samples for VendorSkus ListCredential. */ +public final class VendorSkusListCredentialSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuListCredential.json + */ + /** + * Sample code: Generate a credential for vendor sku. + * + * @param manager Entry point to HybridNetworkManager. + */ + public static void generateACredentialForVendorSku( + com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { + manager.vendorSkus().listCredentialWithResponse("TestVendor", "TestSku", Context.NONE); + } +} +``` + ### Vendors_CreateOrUpdate ```java /** Samples for Vendors CreateOrUpdate. */ public final class VendorsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorCreate.json + */ /** * Sample code: Create or update Vendor resource. * @@ -995,6 +1152,9 @@ import com.azure.core.util.Context; /** Samples for Vendors Delete. */ public final class VendorsDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorDelete.json + */ /** * Sample code: Delete vendor resource. * @@ -1013,6 +1173,9 @@ import com.azure.core.util.Context; /** Samples for Vendors Get. */ public final class VendorsGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorGet.json + */ /** * Sample code: Get Vendor resource. * @@ -1031,6 +1194,9 @@ import com.azure.core.util.Context; /** Samples for Vendors List. */ public final class VendorsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorListBySubscription.json + */ /** * Sample code: List all vendor resources in subscription. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/pom.xml b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/pom.xml index 5958faf9fe4e..ecc94a06c1e3 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/pom.xml +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for HybridNetwork Management - This package contains Microsoft Azure SDK for HybridNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The definitions in this swagger specification will be used to manage the Hybrid Network resources. Package tag package-2021-05-01. + This package contains Microsoft Azure SDK for HybridNetwork Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The definitions in this swagger specification will be used to manage the Hybrid Network resources. Package tag package-2022-01-01-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/HybridNetworkManager.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/HybridNetworkManager.java index 23417e19fb88..9091a201bd56 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/HybridNetworkManager.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/HybridNetworkManager.java @@ -8,6 +8,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; @@ -47,15 +48,20 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** * Entry point to HybridNetworkManager. The definitions in this swagger specification will be used to manage the Hybrid * Network resources. */ public final class HybridNetworkManager { + private Devices devices; + private NetworkFunctions networkFunctions; - private Devices devices; + private NetworkFunctionVendors networkFunctionVendors; + + private NetworkFunctionVendorSkus networkFunctionVendorSkus; private Operations operations; @@ -65,10 +71,6 @@ public final class HybridNetworkManager { private VendorSkuPreviews vendorSkuPreviews; - private NetworkFunctionVendors networkFunctionVendors; - - private NetworkFunctionVendorSkus networkFunctionVendorSkus; - private VendorNetworkFunctions vendorNetworkFunctions; private RoleInstances roleInstances; @@ -111,7 +113,7 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -185,9 +187,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -232,11 +236,24 @@ public HybridNetworkManager authenticate(TokenCredential credential, AzureProfil List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -248,6 +265,14 @@ public HybridNetworkManager authenticate(TokenCredential credential, AzureProfil } } + /** @return Resource collection API of Devices. */ + public Devices devices() { + if (this.devices == null) { + this.devices = new DevicesImpl(clientObject.getDevices(), this); + } + return devices; + } + /** @return Resource collection API of NetworkFunctions. */ public NetworkFunctions networkFunctions() { if (this.networkFunctions == null) { @@ -256,12 +281,22 @@ public NetworkFunctions networkFunctions() { return networkFunctions; } - /** @return Resource collection API of Devices. */ - public Devices devices() { - if (this.devices == null) { - this.devices = new DevicesImpl(clientObject.getDevices(), this); + /** @return Resource collection API of NetworkFunctionVendors. */ + public NetworkFunctionVendors networkFunctionVendors() { + if (this.networkFunctionVendors == null) { + this.networkFunctionVendors = + new NetworkFunctionVendorsImpl(clientObject.getNetworkFunctionVendors(), this); } - return devices; + return networkFunctionVendors; + } + + /** @return Resource collection API of NetworkFunctionVendorSkus. */ + public NetworkFunctionVendorSkus networkFunctionVendorSkus() { + if (this.networkFunctionVendorSkus == null) { + this.networkFunctionVendorSkus = + new NetworkFunctionVendorSkusImpl(clientObject.getNetworkFunctionVendorSkus(), this); + } + return networkFunctionVendorSkus; } /** @return Resource collection API of Operations. */ @@ -296,24 +331,6 @@ public VendorSkuPreviews vendorSkuPreviews() { return vendorSkuPreviews; } - /** @return Resource collection API of NetworkFunctionVendors. */ - public NetworkFunctionVendors networkFunctionVendors() { - if (this.networkFunctionVendors == null) { - this.networkFunctionVendors = - new NetworkFunctionVendorsImpl(clientObject.getNetworkFunctionVendors(), this); - } - return networkFunctionVendors; - } - - /** @return Resource collection API of NetworkFunctionVendorSkus. */ - public NetworkFunctionVendorSkus networkFunctionVendorSkus() { - if (this.networkFunctionVendorSkus == null) { - this.networkFunctionVendorSkus = - new NetworkFunctionVendorSkusImpl(clientObject.getNetworkFunctionVendorSkus(), this); - } - return networkFunctionVendorSkus; - } - /** @return Resource collection API of VendorNetworkFunctions. */ public VendorNetworkFunctions vendorNetworkFunctions() { if (this.vendorNetworkFunctions == null) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/DevicesClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/DevicesClient.java index 5109c2b6fe93..1ed40a4940ce 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/DevicesClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/DevicesClient.java @@ -25,9 +25,9 @@ public interface DevicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String deviceName); /** @@ -39,9 +39,9 @@ public interface DevicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String deviceName, Context context); /** @@ -91,7 +91,7 @@ public interface DevicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String deviceName, Context context); @@ -105,9 +105,9 @@ public interface DevicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return the {@link SyncPoller} for polling of device resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DeviceInner> beginCreateOrUpdate( String resourceGroupName, String deviceName, DeviceInner parameters); @@ -121,9 +121,9 @@ SyncPoller, DeviceInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return the {@link SyncPoller} for polling of device resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DeviceInner> beginCreateOrUpdate( String resourceGroupName, String deviceName, DeviceInner parameters, Context context); @@ -180,7 +180,7 @@ SyncPoller, DeviceInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateTagsWithResponse( @@ -191,7 +191,7 @@ Response updateTagsWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -203,7 +203,7 @@ Response updateTagsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -215,7 +215,7 @@ Response updateTagsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -228,7 +228,7 @@ Response updateTagsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -255,7 +255,7 @@ Response updateTagsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the device registration key. + * @return the device registration key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listRegistrationKeyWithResponse( diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/HybridNetworkManagementClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/HybridNetworkManagementClient.java index a9613ddb088e..3294cec24fc7 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/HybridNetworkManagementClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/HybridNetworkManagementClient.java @@ -44,6 +44,13 @@ public interface HybridNetworkManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the DevicesClient object to access its operations. + * + * @return the DevicesClient object. + */ + DevicesClient getDevices(); + /** * Gets the NetworkFunctionsClient object to access its operations. * @@ -52,11 +59,18 @@ public interface HybridNetworkManagementClient { NetworkFunctionsClient getNetworkFunctions(); /** - * Gets the DevicesClient object to access its operations. + * Gets the NetworkFunctionVendorsClient object to access its operations. * - * @return the DevicesClient object. + * @return the NetworkFunctionVendorsClient object. */ - DevicesClient getDevices(); + NetworkFunctionVendorsClient getNetworkFunctionVendors(); + + /** + * Gets the NetworkFunctionVendorSkusClient object to access its operations. + * + * @return the NetworkFunctionVendorSkusClient object. + */ + NetworkFunctionVendorSkusClient getNetworkFunctionVendorSkus(); /** * Gets the OperationsClient object to access its operations. @@ -86,20 +100,6 @@ public interface HybridNetworkManagementClient { */ VendorSkuPreviewsClient getVendorSkuPreviews(); - /** - * Gets the NetworkFunctionVendorsClient object to access its operations. - * - * @return the NetworkFunctionVendorsClient object. - */ - NetworkFunctionVendorsClient getNetworkFunctionVendors(); - - /** - * Gets the NetworkFunctionVendorSkusClient object to access its operations. - * - * @return the NetworkFunctionVendorSkusClient object. - */ - NetworkFunctionVendorSkusClient getNetworkFunctionVendorSkus(); - /** * Gets the VendorNetworkFunctionsClient object to access its operations. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorSkusClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorSkusClient.java index 6c2238641de2..9a527172f9f6 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorSkusClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorSkusClient.java @@ -20,7 +20,7 @@ public interface NetworkFunctionVendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByVendor(String vendorName); @@ -33,7 +33,7 @@ public interface NetworkFunctionVendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByVendor(String vendorName, Context context); @@ -46,7 +46,7 @@ public interface NetworkFunctionVendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySku(String vendorName, String vendorSkuName); @@ -60,7 +60,7 @@ public interface NetworkFunctionVendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySku( diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorsClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorsClient.java index afb4d4a622c7..5fab9ee4f7eb 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorsClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionVendorsClient.java @@ -17,7 +17,7 @@ public interface NetworkFunctionVendorsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface NetworkFunctionVendorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionsClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionsClient.java index 9f2d8f1dc196..c530b92fa2c9 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionsClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/NetworkFunctionsClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionInner; +import com.azure.resourcemanager.hybridnetwork.models.ExecuteRequestParameters; import com.azure.resourcemanager.hybridnetwork.models.TagsObject; /** An instance of this class provides access to all the operations defined in NetworkFunctionsClient. */ @@ -25,9 +26,9 @@ public interface NetworkFunctionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String networkFunctionName); /** @@ -40,9 +41,9 @@ public interface NetworkFunctionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String networkFunctionName, Context context); @@ -95,7 +96,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -111,9 +112,9 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return the {@link SyncPoller} for polling of network function resource response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFunctionInner> beginCreateOrUpdate( String resourceGroupName, String networkFunctionName, NetworkFunctionInner parameters); @@ -128,9 +129,9 @@ SyncPoller, NetworkFunctionInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return the {@link SyncPoller} for polling of network function resource response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFunctionInner> beginCreateOrUpdate( String resourceGroupName, String networkFunctionName, NetworkFunctionInner parameters, Context context); @@ -191,7 +192,7 @@ NetworkFunctionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateTagsWithResponse( @@ -202,7 +203,7 @@ Response updateTagsWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -214,7 +215,7 @@ Response updateTagsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -226,7 +227,7 @@ Response updateTagsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -239,8 +240,67 @@ Response updateTagsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginExecuteRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters); + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginExecuteRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context); + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void executeRequest(String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters); + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void executeRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/OperationsClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/OperationsClient.java index 68853e606ef3..0c9bdae862b0 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/OperationsClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/OperationsClient.java @@ -17,7 +17,7 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/RoleInstancesClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/RoleInstancesClient.java index 215dc4ececaf..fe2cbf076b37 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/RoleInstancesClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/RoleInstancesClient.java @@ -25,9 +25,9 @@ public interface RoleInstancesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String locationName, String vendorName, String serviceKey, String roleInstanceName); @@ -42,9 +42,9 @@ SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context); @@ -87,9 +87,9 @@ SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String locationName, String vendorName, String serviceKey, String roleInstanceName); @@ -104,9 +104,9 @@ SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context); @@ -149,9 +149,9 @@ SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart( String locationName, String vendorName, String serviceKey, String roleInstanceName); @@ -166,9 +166,9 @@ SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context); @@ -227,7 +227,7 @@ SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the information of role instance of vendor network function. + * @return the information of role instance of vendor network function along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -242,7 +242,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName, String vendorName, String serviceKey); @@ -257,7 +257,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName, String vendorName, String serviceKey, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorNetworkFunctionsClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorNetworkFunctionsClient.java index 86065f5e7395..528c0c6cec15 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorNetworkFunctionsClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorNetworkFunctionsClient.java @@ -39,7 +39,7 @@ public interface VendorNetworkFunctionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -56,9 +56,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return the {@link SyncPoller} for polling of vendor network function sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VendorNetworkFunctionInner> beginCreateOrUpdate( String locationName, String vendorName, String serviceKey, VendorNetworkFunctionInner parameters); @@ -74,9 +74,9 @@ SyncPoller, VendorNetworkFunctionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return the {@link SyncPoller} for polling of vendor network function sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VendorNetworkFunctionInner> beginCreateOrUpdate( String locationName, String vendorName, @@ -132,7 +132,7 @@ VendorNetworkFunctionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName, String vendorName); @@ -149,7 +149,7 @@ VendorNetworkFunctionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkuPreviewsClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkuPreviewsClient.java index b75ad8410171..249480a1c385 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkuPreviewsClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkuPreviewsClient.java @@ -23,7 +23,7 @@ public interface VendorSkuPreviewsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String vendorName, String skuName); @@ -37,7 +37,7 @@ public interface VendorSkuPreviewsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String vendorName, String skuName, Context context); @@ -52,9 +52,9 @@ public interface VendorSkuPreviewsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return the {@link SyncPoller} for polling of customer subscription which can use a sku. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PreviewSubscriptionInner> beginCreateOrUpdate( String vendorName, String skuName, String previewSubscription, PreviewSubscriptionInner parameters); @@ -69,9 +69,9 @@ SyncPoller, PreviewSubscriptionInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return the {@link SyncPoller} for polling of customer subscription which can use a sku. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PreviewSubscriptionInner> beginCreateOrUpdate( String vendorName, String skuName, @@ -140,7 +140,7 @@ PreviewSubscriptionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -155,9 +155,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String vendorName, String skuName, String previewSubscription); /** @@ -170,9 +170,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String vendorName, String skuName, String previewSubscription, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkusClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkusClient.java index c62638145ed2..ed9012940d1e 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkusClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorSkusClient.java @@ -11,6 +11,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.hybridnetwork.fluent.models.SkuCredentialInner; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorSkuInner; /** An instance of this class provides access to all the operations defined in VendorSkusClient. */ @@ -23,9 +24,9 @@ public interface VendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String vendorName, String skuName); /** @@ -37,9 +38,9 @@ public interface VendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String vendorName, String skuName, Context context); /** @@ -89,7 +90,7 @@ public interface VendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String vendorName, String skuName, Context context); @@ -103,9 +104,9 @@ public interface VendorSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return the {@link SyncPoller} for polling of sku sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VendorSkuInner> beginCreateOrUpdate( String vendorName, String skuName, VendorSkuInner parameters); @@ -119,9 +120,9 @@ SyncPoller, VendorSkuInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return the {@link SyncPoller} for polling of sku sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VendorSkuInner> beginCreateOrUpdate( String vendorName, String skuName, VendorSkuInner parameters, Context context); @@ -161,7 +162,7 @@ SyncPoller, VendorSkuInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String vendorName); @@ -174,8 +175,35 @@ SyncPoller, VendorSkuInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String vendorName, Context context); + + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SkuCredentialInner listCredential(String vendorName, String skuName); + + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listCredentialWithResponse(String vendorName, String skuName, Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorsClient.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorsClient.java index f453b7bcdf7c..d34b18eda0b3 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorsClient.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/VendorsClient.java @@ -22,9 +22,9 @@ public interface VendorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String vendorName); /** @@ -35,9 +35,9 @@ public interface VendorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String vendorName, Context context); /** @@ -83,7 +83,7 @@ public interface VendorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String vendorName, Context context); @@ -96,9 +96,9 @@ public interface VendorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return the {@link SyncPoller} for polling of vendor resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VendorInner> beginCreateOrUpdate(String vendorName, VendorInner parameters); /** @@ -110,9 +110,9 @@ public interface VendorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return the {@link SyncPoller} for polling of vendor resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VendorInner> beginCreateOrUpdate( String vendorName, VendorInner parameters, Context context); @@ -160,7 +160,7 @@ SyncPoller, VendorInner> beginCreateOrUpdate( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -172,7 +172,7 @@ SyncPoller, VendorInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceInner.java index ec32ea5049cb..62a737b54126 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceInner.java @@ -8,10 +8,8 @@ import com.azure.core.management.Resource; import com.azure.core.management.SubResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.Status; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -19,8 +17,6 @@ /** Device resource. */ @Fluent public final class DeviceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeviceInner.class); - /* * Device properties. */ @@ -83,29 +79,6 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Get the azureStackEdge property: The reference to the Azure stack edge device. Once set, it cannot be updated. - * - * @return the azureStackEdge value. - */ - public SubResource azureStackEdge() { - return this.innerProperties() == null ? null : this.innerProperties().azureStackEdge(); - } - - /** - * Set the azureStackEdge property: The reference to the Azure stack edge device. Once set, it cannot be updated. - * - * @param azureStackEdge the azureStackEdge value to set. - * @return the DeviceInner object itself. - */ - public DeviceInner withAzureStackEdge(SubResource azureStackEdge) { - if (this.innerProperties() == null) { - this.innerProperties = new DevicePropertiesFormat(); - } - this.innerProperties().withAzureStackEdge(azureStackEdge); - return this; - } - /** * Get the networkFunctions property: The list of network functions deployed on the device. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DevicePropertiesFormat.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DevicePropertiesFormat.java index 711d43c11fc8..9e5c595fc3c4 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DevicePropertiesFormat.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DevicePropertiesFormat.java @@ -4,24 +4,27 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hybridnetwork.models.AzureStackEdgeFormat; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.Status; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; /** Device properties. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "deviceType") +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "deviceType", + defaultImpl = DevicePropertiesFormat.class) @JsonTypeName("DevicePropertiesFormat") -@Fluent -public final class DevicePropertiesFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DevicePropertiesFormat.class); - +@JsonSubTypes({@JsonSubTypes.Type(name = "AzureStackEdge", value = AzureStackEdgeFormat.class)}) +@Immutable +public class DevicePropertiesFormat { /* * The current device status. */ @@ -34,13 +37,6 @@ public final class DevicePropertiesFormat { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /* - * The reference to the Azure stack edge device. Once set, it cannot be - * updated. - */ - @JsonProperty(value = "azureStackEdge") - private SubResource azureStackEdge; - /* * The list of network functions deployed on the device. */ @@ -65,26 +61,6 @@ public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Get the azureStackEdge property: The reference to the Azure stack edge device. Once set, it cannot be updated. - * - * @return the azureStackEdge value. - */ - public SubResource azureStackEdge() { - return this.azureStackEdge; - } - - /** - * Set the azureStackEdge property: The reference to the Azure stack edge device. Once set, it cannot be updated. - * - * @param azureStackEdge the azureStackEdge value to set. - * @return the DevicePropertiesFormat object itself. - */ - public DevicePropertiesFormat withAzureStackEdge(SubResource azureStackEdge) { - this.azureStackEdge = azureStackEdge; - return this; - } - /** * Get the networkFunctions property: The list of network functions deployed on the device. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceRegistrationKeyInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceRegistrationKeyInner.java index c057d3f4d5cd..e5e0362ad89b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceRegistrationKeyInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/DeviceRegistrationKeyInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The device registration key. */ @Immutable public final class DeviceRegistrationKeyInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeviceRegistrationKeyInner.class); - /* * The registration key for the device. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionInner.java index 22f09e260e09..31ac2a162eb0 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionInner.java @@ -8,12 +8,10 @@ import com.azure.core.management.Resource; import com.azure.core.management.SubResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionUserConfiguration; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.SkuType; import com.azure.resourcemanager.hybridnetwork.models.VendorProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -21,8 +19,6 @@ /** Network function resource response. */ @Fluent public final class NetworkFunctionInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionInner.class); - /* * Network function properties. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionPropertiesFormat.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionPropertiesFormat.java index aacc7647eb1e..d3553b99a352 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionPropertiesFormat.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionPropertiesFormat.java @@ -6,20 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionUserConfiguration; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.SkuType; import com.azure.resourcemanager.hybridnetwork.models.VendorProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Network function properties. */ @Fluent public final class NetworkFunctionPropertiesFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionPropertiesFormat.class); - /* * The provisioning state of the network function resource. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionSkuRoleDetailsInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionSkuRoleDetailsInner.java index d01c4fa53faa..e0112b58207e 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionSkuRoleDetailsInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionSkuRoleDetailsInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.NetworkInterface; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network function user configuration. */ @Fluent public final class NetworkFunctionSkuRoleDetailsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionSkuRoleDetailsInner.class); - /* * The name of the network function role. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionVendorInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionVendorInner.java index 5cef0e8a63d3..b580eca5c56e 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionVendorInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/NetworkFunctionVendorInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network function vendor. */ @Fluent public final class NetworkFunctionVendorInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionVendorInner.class); - /* * Vendors of Hybrid Network service provider. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/OperationInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/OperationInner.java index 6b9d203790c9..7b91452aa93a 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/OperationInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/OperationInner.java @@ -4,31 +4,53 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.hybridnetwork.models.ActionType; import com.azure.resourcemanager.hybridnetwork.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.hybridnetwork.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; -/** Object that describes a single Microsoft.HybridNetwork operation. */ -@Immutable +/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */ +@Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* - * Operation name: {provider}/{resource}/{operation}. + * The name of the operation, as per Resource-Based Access Control (RBAC). + * Examples: "Microsoft.Compute/virtualMachines/write", + * "Microsoft.Compute/virtualMachines/capture/action" */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * The object that represents the operation. + * Whether the operation applies to data-plane. This is "true" for + * data-plane operations and "false" for ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. */ - @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "display") private OperationDisplay display; + /* + * The intended executor of the operation; as in Resource Based Access + * Control (RBAC) and audit logs UX. Default value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". * * @return the name value. */ @@ -37,7 +59,17 @@ public String name() { } /** - * Get the display property: The object that represents the operation. + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. * * @return the display value. */ @@ -45,6 +77,37 @@ public OperationDisplay display() { return this.display; } + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + /** * Validates the instance. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionInner.java index 45287db05dc5..cd128553c5ca 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Customer subscription which can use a sku. */ @Fluent public final class PreviewSubscriptionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PreviewSubscriptionInner.class); - /* * The Preview Subscription properties. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionProperties.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionProperties.java index cd593a0e1667..7f2a9d039064 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionProperties.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/PreviewSubscriptionProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** PreviewSubscription properties. */ @Immutable public final class PreviewSubscriptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PreviewSubscriptionProperties.class); - /* * The provisioning state of the PreviewSubscription resource. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceInner.java index 081475372b8b..7809cd2f699c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceInner.java @@ -7,17 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.OperationalState; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The role instance sub resource. */ @Fluent public final class RoleInstanceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoleInstanceInner.class); - /* * The role instance name. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceProperties.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceProperties.java index 93322c317f29..d6cf5c96efe6 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceProperties.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/RoleInstanceProperties.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.OperationalState; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The role instance properties of the network function. */ @Fluent public final class RoleInstanceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoleInstanceProperties.class); - /* * The provisioning state of the RoleInstance resource. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/SkuCredentialInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/SkuCredentialInner.java new file mode 100644 index 000000000000..67e6efeb1cd1 --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/SkuCredentialInner.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The Sku credential definition. */ +@Fluent +public final class SkuCredentialInner { + /* + * The username of the sku credential. + */ + @JsonProperty(value = "username") + private String username; + + /* + * The credential value. + */ + @JsonProperty(value = "acrToken") + private String acrToken; + + /* + * The Acr server url + */ + @JsonProperty(value = "acrServerUrl") + private String acrServerUrl; + + /* + * The repositories that could be accessed using the current credential. + */ + @JsonProperty(value = "repositories") + private List repositories; + + /* + * The UTC time when credential will expire. + */ + @JsonProperty(value = "expiry") + private OffsetDateTime expiry; + + /** + * Get the username property: The username of the sku credential. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username of the sku credential. + * + * @param username the username value to set. + * @return the SkuCredentialInner object itself. + */ + public SkuCredentialInner withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the acrToken property: The credential value. + * + * @return the acrToken value. + */ + public String acrToken() { + return this.acrToken; + } + + /** + * Set the acrToken property: The credential value. + * + * @param acrToken the acrToken value to set. + * @return the SkuCredentialInner object itself. + */ + public SkuCredentialInner withAcrToken(String acrToken) { + this.acrToken = acrToken; + return this; + } + + /** + * Get the acrServerUrl property: The Acr server url. + * + * @return the acrServerUrl value. + */ + public String acrServerUrl() { + return this.acrServerUrl; + } + + /** + * Set the acrServerUrl property: The Acr server url. + * + * @param acrServerUrl the acrServerUrl value to set. + * @return the SkuCredentialInner object itself. + */ + public SkuCredentialInner withAcrServerUrl(String acrServerUrl) { + this.acrServerUrl = acrServerUrl; + return this; + } + + /** + * Get the repositories property: The repositories that could be accessed using the current credential. + * + * @return the repositories value. + */ + public List repositories() { + return this.repositories; + } + + /** + * Set the repositories property: The repositories that could be accessed using the current credential. + * + * @param repositories the repositories value to set. + * @return the SkuCredentialInner object itself. + */ + public SkuCredentialInner withRepositories(List repositories) { + this.repositories = repositories; + return this; + } + + /** + * Get the expiry property: The UTC time when credential will expire. + * + * @return the expiry value. + */ + public OffsetDateTime expiry() { + return this.expiry; + } + + /** + * Set the expiry property: The UTC time when credential will expire. + * + * @param expiry the expiry value to set. + * @return the SkuCredentialInner object itself. + */ + public SkuCredentialInner withExpiry(OffsetDateTime expiry) { + this.expiry = expiry; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/SkuOverviewInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/SkuOverviewInner.java index f26c81779ee0..78391b6abe61 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/SkuOverviewInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/SkuOverviewInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.SkuType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The network function sku overview. */ @Fluent public final class SkuOverviewInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuOverviewInner.class); - /* * The vendor sku name. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorDetails.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorDetails.java index 0e2bb0efdd3b..27b302c0fb70 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorDetails.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network function vendor details. */ @Fluent public final class VendorDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorDetails.class); - /* * The network function vendor name. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorInner.java index aaef286fbbfb..fc4176a60be6 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorInner.java @@ -8,17 +8,13 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SubResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Vendor resource. */ @Fluent public final class VendorInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorInner.class); - /* * Vendor properties. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionInner.java index 72f87bed3cf6..1869408d572a 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionInner.java @@ -7,20 +7,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionVendorConfiguration; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.SkuType; import com.azure.resourcemanager.hybridnetwork.models.VendorProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Vendor network function sub resource. */ @Fluent public final class VendorNetworkFunctionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorNetworkFunctionInner.class); - /* * Network function details. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionPropertiesFormat.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionPropertiesFormat.java index 5850168297e9..cb12a7b2d9f3 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionPropertiesFormat.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorNetworkFunctionPropertiesFormat.java @@ -5,20 +5,16 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionVendorConfiguration; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.SkuType; import com.azure.resourcemanager.hybridnetwork.models.VendorProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Vendor network function properties. */ @Fluent public final class VendorNetworkFunctionPropertiesFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorNetworkFunctionPropertiesFormat.class); - /* * The provisioning state of the vendor network function sub resource. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorPropertiesFormat.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorPropertiesFormat.java index dcebfa72d144..c3533965f2b2 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorPropertiesFormat.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorPropertiesFormat.java @@ -6,17 +6,13 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.SubResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Vendor properties. */ @Immutable public final class VendorPropertiesFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorPropertiesFormat.class); - /* * The provisioning state of the vendor resource. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuInner.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuInner.java index 62a365326da6..322f443737b2 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuInner.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuInner.java @@ -7,20 +7,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionTemplate; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionType; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.SkuDeploymentMode; import com.azure.resourcemanager.hybridnetwork.models.SkuType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Sku sub resource. */ @Fluent public final class VendorSkuInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorSkuInner.class); - /* * Vendor sku details. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuPropertiesFormat.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuPropertiesFormat.java index e847c0718846..4a52bb7ffa72 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuPropertiesFormat.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/fluent/models/VendorSkuPropertiesFormat.java @@ -5,20 +5,16 @@ package com.azure.resourcemanager.hybridnetwork.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionTemplate; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionType; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; import com.azure.resourcemanager.hybridnetwork.models.SkuDeploymentMode; import com.azure.resourcemanager.hybridnetwork.models.SkuType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Sku properties. */ @Fluent public final class VendorSkuPropertiesFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorSkuPropertiesFormat.class); - /* * The provisioning state of the vendor sku sub resource. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DeviceImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DeviceImpl.java index c6405efd41c7..45f512c27fd2 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DeviceImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DeviceImpl.java @@ -61,10 +61,6 @@ public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public SubResource azureStackEdge() { - return this.innerModel().azureStackEdge(); - } - public List networkFunctions() { List inner = this.innerModel().networkFunctions(); if (inner != null) { @@ -205,11 +201,6 @@ public DeviceImpl withTags(Map tags) { } } - public DeviceImpl withAzureStackEdge(SubResource azureStackEdge) { - this.innerModel().withAzureStackEdge(azureStackEdge); - return this; - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesClientImpl.java index f6e3c19f1d77..7a3510d04832 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.DevicesClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in DevicesClient. */ public final class DevicesClientImpl implements DevicesClient { - private final ClientLogger logger = new ClientLogger(DevicesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DevicesService service; @@ -201,7 +198,7 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String deviceName) { @@ -249,7 +246,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -294,14 +291,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deviceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, deviceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -313,9 +311,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String deviceName, Context context) { context = this.client.mergeContext(context); @@ -333,9 +331,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deviceName) { return beginDeleteAsync(resourceGroupName, deviceName).getSyncPoller(); } @@ -349,9 +347,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String deviceName, Context context) { return beginDeleteAsync(resourceGroupName, deviceName, context).getSyncPoller(); @@ -365,7 +363,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String deviceName) { @@ -381,7 +379,7 @@ private Mono deleteAsync(String resourceGroupName, String deviceName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String deviceName, Context context) { @@ -427,7 +425,8 @@ public void delete(String resourceGroupName, String deviceName, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -476,7 +475,8 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -521,7 +521,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String deviceName) { @@ -560,7 +560,7 @@ public DeviceInner getByResourceGroup(String resourceGroupName, String deviceNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -577,7 +577,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -633,7 +633,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -685,9 +685,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return the {@link PollerFlux} for polling of device resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeviceInner> beginCreateOrUpdateAsync( String resourceGroupName, String deviceName, DeviceInner parameters) { Mono>> mono = @@ -695,7 +695,7 @@ private PollerFlux, DeviceInner> beginCreateOrUpdateAsyn return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DeviceInner.class, DeviceInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), DeviceInner.class, DeviceInner.class, this.client.getContext()); } /** @@ -708,9 +708,9 @@ private PollerFlux, DeviceInner> beginCreateOrUpdateAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return the {@link PollerFlux} for polling of device resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeviceInner> beginCreateOrUpdateAsync( String resourceGroupName, String deviceName, DeviceInner parameters, Context context) { context = this.client.mergeContext(context); @@ -731,9 +731,9 @@ private PollerFlux, DeviceInner> beginCreateOrUpdateAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return the {@link SyncPoller} for polling of device resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DeviceInner> beginCreateOrUpdate( String resourceGroupName, String deviceName, DeviceInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, deviceName, parameters).getSyncPoller(); @@ -749,9 +749,9 @@ public SyncPoller, DeviceInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return the {@link SyncPoller} for polling of device resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DeviceInner> beginCreateOrUpdate( String resourceGroupName, String deviceName, DeviceInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, deviceName, parameters, context).getSyncPoller(); @@ -766,7 +766,7 @@ public SyncPoller, DeviceInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String deviceName, DeviceInner parameters) { @@ -785,7 +785,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String d * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -838,7 +838,7 @@ public DeviceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( @@ -894,7 +894,7 @@ private Mono> updateTagsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( @@ -946,7 +946,7 @@ private Mono> updateTagsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateTagsAsync(String resourceGroupName, String deviceName, TagsObject parameters) { @@ -987,7 +987,7 @@ public DeviceInner updateTags(String resourceGroupName, String deviceName, TagsO * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return device resource. + * @return device resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateTagsWithResponse( @@ -1000,7 +1000,8 @@ public Response updateTagsWithResponse( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1046,7 +1047,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1087,7 +1089,7 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1102,7 +1104,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1115,7 +1117,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1129,7 +1131,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1143,7 +1145,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1195,7 +1198,8 @@ private Mono> listByResourceGroupSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1244,7 +1248,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1261,7 +1265,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1277,7 +1281,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1292,7 +1296,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1307,7 +1311,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the device registration key. + * @return the device registration key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRegistrationKeyWithResponseAsync( @@ -1356,7 +1360,7 @@ private Mono> listRegistrationKeyWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the device registration key. + * @return the device registration key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRegistrationKeyWithResponseAsync( @@ -1401,7 +1405,7 @@ private Mono> listRegistrationKeyWithRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the device registration key. + * @return the device registration key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listRegistrationKeyAsync(String resourceGroupName, String deviceName) { @@ -1440,7 +1444,7 @@ public DeviceRegistrationKeyInner listRegistrationKey(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the device registration key. + * @return the device registration key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listRegistrationKeyWithResponse( @@ -1455,7 +1459,8 @@ public Response listRegistrationKeyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1492,7 +1497,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -1527,7 +1533,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1564,7 +1571,8 @@ private Mono> listByResourceGroupNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesImpl.java index 53ada1f4ca13..6a6723393e1d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/DevicesImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.hybridnetwork.models.Device; import com.azure.resourcemanager.hybridnetwork.models.DeviceRegistrationKey; import com.azure.resourcemanager.hybridnetwork.models.Devices; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DevicesImpl implements Devices { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DevicesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DevicesImpl.class); private final DevicesClient innerClient; @@ -109,7 +108,7 @@ public Response listRegistrationKeyWithResponse( public Device getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -117,7 +116,7 @@ public Device getById(String id) { } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); @@ -128,7 +127,7 @@ public Device getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,7 +135,7 @@ public Response getByIdWithResponse(String id, Context context) { } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); @@ -147,7 +146,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -155,7 +154,7 @@ public void deleteById(String id) { } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); @@ -166,7 +165,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -174,7 +173,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String deviceName = Utils.getValueFromIdByName(id, "devices"); if (deviceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'devices'.", id))); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/HybridNetworkManagementClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/HybridNetworkManagementClientImpl.java index 68afd30656ae..001861ae10d8 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/HybridNetworkManagementClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/HybridNetworkManagementClientImpl.java @@ -45,8 +45,6 @@ /** Initializes a new instance of the HybridNetworkManagementClientImpl type. */ @ServiceClient(builder = HybridNetworkManagementClientBuilder.class) public final class HybridNetworkManagementClientImpl implements HybridNetworkManagementClient { - private final ClientLogger logger = new ClientLogger(HybridNetworkManagementClientImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -119,6 +117,18 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The DevicesClient object to access its operations. */ + private final DevicesClient devices; + + /** + * Gets the DevicesClient object to access its operations. + * + * @return the DevicesClient object. + */ + public DevicesClient getDevices() { + return this.devices; + } + /** The NetworkFunctionsClient object to access its operations. */ private final NetworkFunctionsClient networkFunctions; @@ -131,16 +141,28 @@ public NetworkFunctionsClient getNetworkFunctions() { return this.networkFunctions; } - /** The DevicesClient object to access its operations. */ - private final DevicesClient devices; + /** The NetworkFunctionVendorsClient object to access its operations. */ + private final NetworkFunctionVendorsClient networkFunctionVendors; /** - * Gets the DevicesClient object to access its operations. + * Gets the NetworkFunctionVendorsClient object to access its operations. * - * @return the DevicesClient object. + * @return the NetworkFunctionVendorsClient object. */ - public DevicesClient getDevices() { - return this.devices; + public NetworkFunctionVendorsClient getNetworkFunctionVendors() { + return this.networkFunctionVendors; + } + + /** The NetworkFunctionVendorSkusClient object to access its operations. */ + private final NetworkFunctionVendorSkusClient networkFunctionVendorSkus; + + /** + * Gets the NetworkFunctionVendorSkusClient object to access its operations. + * + * @return the NetworkFunctionVendorSkusClient object. + */ + public NetworkFunctionVendorSkusClient getNetworkFunctionVendorSkus() { + return this.networkFunctionVendorSkus; } /** The OperationsClient object to access its operations. */ @@ -191,30 +213,6 @@ public VendorSkuPreviewsClient getVendorSkuPreviews() { return this.vendorSkuPreviews; } - /** The NetworkFunctionVendorsClient object to access its operations. */ - private final NetworkFunctionVendorsClient networkFunctionVendors; - - /** - * Gets the NetworkFunctionVendorsClient object to access its operations. - * - * @return the NetworkFunctionVendorsClient object. - */ - public NetworkFunctionVendorsClient getNetworkFunctionVendors() { - return this.networkFunctionVendors; - } - - /** The NetworkFunctionVendorSkusClient object to access its operations. */ - private final NetworkFunctionVendorSkusClient networkFunctionVendorSkus; - - /** - * Gets the NetworkFunctionVendorSkusClient object to access its operations. - * - * @return the NetworkFunctionVendorSkusClient object. - */ - public NetworkFunctionVendorSkusClient getNetworkFunctionVendorSkus() { - return this.networkFunctionVendorSkus; - } - /** The VendorNetworkFunctionsClient object to access its operations. */ private final VendorNetworkFunctionsClient vendorNetworkFunctions; @@ -261,15 +259,15 @@ public RoleInstancesClient getRoleInstances() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-05-01"; - this.networkFunctions = new NetworkFunctionsClientImpl(this); + this.apiVersion = "2022-01-01-preview"; this.devices = new DevicesClientImpl(this); + this.networkFunctions = new NetworkFunctionsClientImpl(this); + this.networkFunctionVendors = new NetworkFunctionVendorsClientImpl(this); + this.networkFunctionVendorSkus = new NetworkFunctionVendorSkusClientImpl(this); this.operations = new OperationsClientImpl(this); this.vendors = new VendorsClientImpl(this); this.vendorSkus = new VendorSkusClientImpl(this); this.vendorSkuPreviews = new VendorSkuPreviewsClientImpl(this); - this.networkFunctionVendors = new NetworkFunctionVendorsClientImpl(this); - this.networkFunctionVendorSkus = new NetworkFunctionVendorSkusClientImpl(this); this.vendorNetworkFunctions = new VendorNetworkFunctionsClientImpl(this); this.roleInstances = new RoleInstancesClientImpl(this); } @@ -357,7 +355,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -416,4 +414,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(HybridNetworkManagementClientImpl.class); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionImpl.java index bd2971d8753d..3a21d2a1b729 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionImpl.java @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionInner; +import com.azure.resourcemanager.hybridnetwork.models.ExecuteRequestParameters; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunction; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionUserConfiguration; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; @@ -210,6 +211,14 @@ public NetworkFunction refresh(Context context) { return this; } + public void executeRequest(ExecuteRequestParameters parameters) { + serviceManager.networkFunctions().executeRequest(resourceGroupName, networkFunctionName, parameters); + } + + public void executeRequest(ExecuteRequestParameters parameters, Context context) { + serviceManager.networkFunctions().executeRequest(resourceGroupName, networkFunctionName, parameters, context); + } + public NetworkFunctionImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusClientImpl.java index 3d2a625f9e73..db1af3feb992 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.NetworkFunctionVendorSkusClient; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionSkuRoleDetailsInner; import com.azure.resourcemanager.hybridnetwork.fluent.models.SkuOverviewInner; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in NetworkFunctionVendorSkusClient. */ public final class NetworkFunctionVendorSkusClientImpl implements NetworkFunctionVendorSkusClient { - private final ClientLogger logger = new ClientLogger(NetworkFunctionVendorSkusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final NetworkFunctionVendorSkusService service; @@ -120,7 +117,8 @@ Mono> listBySkuNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVendorSinglePageAsync(String vendorName) { @@ -171,7 +169,8 @@ private Mono> listByVendorSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVendorSinglePageAsync(String vendorName, Context context) { @@ -218,7 +217,7 @@ private Mono> listByVendorSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByVendorAsync(String vendorName) { @@ -234,7 +233,7 @@ private PagedFlux listByVendorAsync(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByVendorAsync(String vendorName, Context context) { @@ -250,7 +249,7 @@ private PagedFlux listByVendorAsync(String vendorName, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByVendor(String vendorName) { @@ -265,7 +264,7 @@ public PagedIterable listByVendor(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByVendor(String vendorName, Context context) { @@ -280,7 +279,8 @@ public PagedIterable listByVendor(String vendorName, Context c * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySkuSinglePageAsync( @@ -337,7 +337,8 @@ private Mono> listBySkuSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySkuSinglePageAsync( @@ -390,7 +391,7 @@ private Mono> listBySkuSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySkuAsync(String vendorName, String vendorSkuName) { @@ -408,7 +409,7 @@ private PagedFlux listBySkuAsync(String vend * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySkuAsync( @@ -426,7 +427,7 @@ private PagedFlux listBySkuAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySku(String vendorName, String vendorSkuName) { @@ -442,7 +443,7 @@ public PagedIterable listBySku(String vendor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySku( @@ -457,7 +458,8 @@ public PagedIterable listBySku( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVendorNextSinglePageAsync(String nextLink) { @@ -493,7 +495,8 @@ private Mono> listByVendorNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByVendorNextSinglePageAsync(String nextLink, Context context) { @@ -528,7 +531,8 @@ private Mono> listByVendorNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySkuNextSinglePageAsync(String nextLink) { @@ -564,7 +568,8 @@ private Mono> listBySkuNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySkuNextSinglePageAsync( diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusImpl.java index 547e6a7debd1..a23a3df1a393 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorSkusImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionSkuRoleDetails; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionVendorSkus; import com.azure.resourcemanager.hybridnetwork.models.SkuOverview; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class NetworkFunctionVendorSkusImpl implements NetworkFunctionVendorSkus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionVendorSkusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NetworkFunctionVendorSkusImpl.class); private final NetworkFunctionVendorSkusClient innerClient; diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsClientImpl.java index a9256239b222..75085c22f13e 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.NetworkFunctionVendorsClient; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionVendorInner; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionVendorListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in NetworkFunctionVendorsClient. */ public final class NetworkFunctionVendorsClientImpl implements NetworkFunctionVendorsClient { - private final ClientLogger logger = new ClientLogger(NetworkFunctionVendorsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final NetworkFunctionVendorsService service; @@ -87,7 +84,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -133,7 +131,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -174,7 +173,7 @@ private Mono> listSinglePageAsync(Cont * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -188,7 +187,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -201,7 +200,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -215,7 +214,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -229,7 +228,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -265,7 +265,8 @@ private Mono> listNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsImpl.java index a956f80ab03b..8ab762bd8a98 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionVendorsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionVendorInner; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionVendor; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionVendors; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class NetworkFunctionVendorsImpl implements NetworkFunctionVendors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionVendorsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NetworkFunctionVendorsImpl.class); private final NetworkFunctionVendorsClient innerClient; diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsClientImpl.java index 10a76f91f392..575665356af0 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -30,11 +31,11 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.NetworkFunctionsClient; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionInner; +import com.azure.resourcemanager.hybridnetwork.models.ExecuteRequestParameters; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionListResult; import com.azure.resourcemanager.hybridnetwork.models.TagsObject; import java.nio.ByteBuffer; @@ -43,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in NetworkFunctionsClient. */ public final class NetworkFunctionsClientImpl implements NetworkFunctionsClient { - private final ClientLogger logger = new ClientLogger(NetworkFunctionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final NetworkFunctionsService service; @@ -156,6 +155,22 @@ Mono> listByResourceGroup( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork" + + "/networkFunctions/{networkFunctionName}/executeRequest") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> executeRequest( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("networkFunctionName") String networkFunctionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ExecuteRequestParameters parameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -186,7 +201,7 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -237,7 +252,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -284,14 +299,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkFunctionName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkFunctionName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -304,9 +320,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String networkFunctionName, Context context) { context = this.client.mergeContext(context); @@ -326,9 +342,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkFunctionName) { return beginDeleteAsync(resourceGroupName, networkFunctionName).getSyncPoller(); } @@ -343,9 +359,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String networkFunctionName, Context context) { return beginDeleteAsync(resourceGroupName, networkFunctionName, context).getSyncPoller(); @@ -360,7 +376,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String networkFunctionName) { @@ -379,7 +395,7 @@ private Mono deleteAsync(String resourceGroupName, String networkFunctionN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String networkFunctionName, Context context) { @@ -427,7 +443,8 @@ public void delete(String resourceGroupName, String networkFunctionName, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -477,7 +494,8 @@ private Mono> getByResourceGroupWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -523,7 +541,7 @@ private Mono> getByResourceGroupWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String networkFunctionName) { @@ -562,7 +580,7 @@ public NetworkFunctionInner getByResourceGroup(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -580,7 +598,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -638,7 +656,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -692,9 +710,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return the {@link PollerFlux} for polling of network function resource response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFunctionInner> beginCreateOrUpdateAsync( String resourceGroupName, String networkFunctionName, NetworkFunctionInner parameters) { Mono>> mono = @@ -706,7 +724,7 @@ private PollerFlux, NetworkFunctionInner> begin this.client.getHttpPipeline(), NetworkFunctionInner.class, NetworkFunctionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -720,9 +738,9 @@ private PollerFlux, NetworkFunctionInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return the {@link PollerFlux} for polling of network function resource response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFunctionInner> beginCreateOrUpdateAsync( String resourceGroupName, String networkFunctionName, NetworkFunctionInner parameters, Context context) { context = this.client.mergeContext(context); @@ -744,9 +762,9 @@ private PollerFlux, NetworkFunctionInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return the {@link SyncPoller} for polling of network function resource response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFunctionInner> beginCreateOrUpdate( String resourceGroupName, String networkFunctionName, NetworkFunctionInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, networkFunctionName, parameters).getSyncPoller(); @@ -763,9 +781,9 @@ public SyncPoller, NetworkFunctionInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return the {@link SyncPoller} for polling of network function resource response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFunctionInner> beginCreateOrUpdate( String resourceGroupName, String networkFunctionName, NetworkFunctionInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, networkFunctionName, parameters, context).getSyncPoller(); @@ -781,7 +799,7 @@ public SyncPoller, NetworkFunctionInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -802,7 +820,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -858,7 +876,7 @@ public NetworkFunctionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( @@ -915,7 +933,7 @@ private Mono> updateTagsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( @@ -968,7 +986,7 @@ private Mono> updateTagsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateTagsAsync( @@ -1011,7 +1029,7 @@ public NetworkFunctionInner updateTags( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network function resource response. + * @return network function resource response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateTagsWithResponse( @@ -1024,7 +1042,8 @@ public Response updateTagsWithResponse( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1070,7 +1089,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1111,7 +1131,7 @@ private Mono> listSinglePageAsync(Context co * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1126,7 +1146,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1139,7 +1159,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1153,7 +1173,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1167,7 +1187,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1219,7 +1240,8 @@ private Mono> listByResourceGroupSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1268,7 +1290,7 @@ private Mono> listByResourceGroupSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1285,7 +1307,7 @@ private PagedFlux listByResourceGroupAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1301,7 +1323,7 @@ private PagedFlux listByResourceGroupAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1316,13 +1338,275 @@ public PagedIterable listByResourceGroup(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> executeRequestWithResponseAsync( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFunctionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFunctionName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .executeRequest( + this.client.getEndpoint(), + resourceGroupName, + networkFunctionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> executeRequestWithResponseAsync( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFunctionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFunctionName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .executeRequest( + this.client.getEndpoint(), + resourceGroupName, + networkFunctionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginExecuteRequestAsync( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters) { + Mono>> mono = + executeRequestWithResponseAsync(resourceGroupName, networkFunctionName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginExecuteRequestAsync( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + executeRequestWithResponseAsync(resourceGroupName, networkFunctionName, parameters, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginExecuteRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters) { + return beginExecuteRequestAsync(resourceGroupName, networkFunctionName, parameters).getSyncPoller(); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginExecuteRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context) { + return beginExecuteRequestAsync(resourceGroupName, networkFunctionName, parameters, context).getSyncPoller(); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeRequestAsync( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters) { + return beginExecuteRequestAsync(resourceGroupName, networkFunctionName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeRequestAsync( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context) { + return beginExecuteRequestAsync(resourceGroupName, networkFunctionName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void executeRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters) { + executeRequestAsync(resourceGroupName, networkFunctionName, parameters).block(); + } + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void executeRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context) { + executeRequestAsync(resourceGroupName, networkFunctionName, parameters, context).block(); + } + /** * Get the next page of items. * @@ -1330,7 +1614,8 @@ public PagedIterable listByResourceGroup(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1367,7 +1652,8 @@ private Mono> listBySubscriptionNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( @@ -1403,7 +1689,8 @@ private Mono> listBySubscriptionNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1440,7 +1727,8 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsImpl.java index 831603a49300..ef5e4792f5aa 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsImpl.java @@ -11,12 +11,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.NetworkFunctionsClient; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionInner; +import com.azure.resourcemanager.hybridnetwork.models.ExecuteRequestParameters; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunction; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class NetworkFunctionsImpl implements NetworkFunctions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(NetworkFunctionsImpl.class); private final NetworkFunctionsClient innerClient; @@ -82,10 +82,20 @@ public PagedIterable listByResourceGroup(String resourceGroupNa return Utils.mapPage(inner, inner1 -> new NetworkFunctionImpl(inner1, this.manager())); } + public void executeRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters) { + this.serviceClient().executeRequest(resourceGroupName, networkFunctionName, parameters); + } + + public void executeRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context) { + this.serviceClient().executeRequest(resourceGroupName, networkFunctionName, parameters, context); + } + public NetworkFunction getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -93,7 +103,7 @@ public NetworkFunction getById(String id) { } String networkFunctionName = Utils.getValueFromIdByName(id, "networkFunctions"); if (networkFunctionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,7 +116,7 @@ public NetworkFunction getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -114,7 +124,7 @@ public Response getByIdWithResponse(String id, Context context) } String networkFunctionName = Utils.getValueFromIdByName(id, "networkFunctions"); if (networkFunctionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -127,7 +137,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -135,7 +145,7 @@ public void deleteById(String id) { } String networkFunctionName = Utils.getValueFromIdByName(id, "networkFunctions"); if (networkFunctionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -148,7 +158,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -156,7 +166,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String networkFunctionName = Utils.getValueFromIdByName(id, "networkFunctions"); if (networkFunctionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationImpl.java index 83d4e87804f0..0eddb9e981c1 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationImpl.java @@ -5,8 +5,10 @@ package com.azure.resourcemanager.hybridnetwork.implementation; import com.azure.resourcemanager.hybridnetwork.fluent.models.OperationInner; +import com.azure.resourcemanager.hybridnetwork.models.ActionType; import com.azure.resourcemanager.hybridnetwork.models.Operation; import com.azure.resourcemanager.hybridnetwork.models.OperationDisplay; +import com.azure.resourcemanager.hybridnetwork.models.Origin; public final class OperationImpl implements Operation { private OperationInner innerObject; @@ -23,10 +25,22 @@ public String name() { return this.innerModel().name(); } + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + public OperationDisplay display() { return this.innerModel().display(); } + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + public OperationInner innerModel() { return this.innerObject; } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsClientImpl.java index 6a5c0547c457..0a2d4768283e 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsClientImpl.java @@ -25,16 +25,13 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.OperationsClient; import com.azure.resourcemanager.hybridnetwork.fluent.models.OperationInner; -import com.azure.resourcemanager.hybridnetwork.models.OperationList; +import com.azure.resourcemanager.hybridnetwork.models.OperationListResult; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -63,7 +60,7 @@ private interface OperationsService { @Get("/providers/Microsoft.HybridNetwork/operations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, @@ -73,7 +70,7 @@ Mono> list( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -85,7 +82,7 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +115,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +145,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +159,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +172,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +186,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +200,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +237,8 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsImpl.java index 6a6affc83cea..cd6b784d727f 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.hybridnetwork.fluent.models.OperationInner; import com.azure.resourcemanager.hybridnetwork.models.Operation; import com.azure.resourcemanager.hybridnetwork.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesClientImpl.java index f9dfe0b2d895..8c3c299f937d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesClientImpl.java @@ -27,7 +27,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.RoleInstancesClient; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in RoleInstancesClient. */ public final class RoleInstancesClientImpl implements RoleInstancesClient { - private final ClientLogger logger = new ClientLogger(RoleInstancesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final RoleInstancesService service; @@ -170,7 +167,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -229,7 +226,7 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -284,16 +281,17 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String locationName, String vendorName, String serviceKey, String roleInstanceName) { Mono>> mono = startWithResponseAsync(locationName, vendorName, serviceKey, roleInstanceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -307,9 +305,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) { context = this.client.mergeContext(context); @@ -330,9 +328,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String locationName, String vendorName, String serviceKey, String roleInstanceName) { return beginStartAsync(locationName, vendorName, serviceKey, roleInstanceName).getSyncPoller(); @@ -349,9 +347,9 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) { return beginStartAsync(locationName, vendorName, serviceKey, roleInstanceName, context).getSyncPoller(); @@ -367,7 +365,7 @@ public SyncPoller, Void> beginStart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String locationName, String vendorName, String serviceKey, String roleInstanceName) { @@ -387,7 +385,7 @@ private Mono startAsync(String locationName, String vendorName, String ser * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync( @@ -441,7 +439,7 @@ public void start( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -500,7 +498,7 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -555,16 +553,17 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String locationName, String vendorName, String serviceKey, String roleInstanceName) { Mono>> mono = stopWithResponseAsync(locationName, vendorName, serviceKey, roleInstanceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -578,9 +577,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) { context = this.client.mergeContext(context); @@ -601,9 +600,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String locationName, String vendorName, String serviceKey, String roleInstanceName) { return beginStopAsync(locationName, vendorName, serviceKey, roleInstanceName).getSyncPoller(); @@ -620,9 +619,9 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) { return beginStopAsync(locationName, vendorName, serviceKey, roleInstanceName, context).getSyncPoller(); @@ -638,7 +637,7 @@ public SyncPoller, Void> beginStop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String locationName, String vendorName, String serviceKey, String roleInstanceName) { @@ -658,7 +657,7 @@ private Mono stopAsync(String locationName, String vendorName, String serv * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync( @@ -712,7 +711,7 @@ public void stop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync( @@ -771,7 +770,7 @@ private Mono>> restartWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync( @@ -826,16 +825,17 @@ private Mono>> restartWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync( String locationName, String vendorName, String serviceKey, String roleInstanceName) { Mono>> mono = restartWithResponseAsync(locationName, vendorName, serviceKey, roleInstanceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -849,9 +849,9 @@ private PollerFlux, Void> beginRestartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) { context = this.client.mergeContext(context); @@ -872,9 +872,9 @@ private PollerFlux, Void> beginRestartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart( String locationName, String vendorName, String serviceKey, String roleInstanceName) { return beginRestartAsync(locationName, vendorName, serviceKey, roleInstanceName).getSyncPoller(); @@ -891,9 +891,9 @@ public SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) { return beginRestartAsync(locationName, vendorName, serviceKey, roleInstanceName, context).getSyncPoller(); @@ -909,7 +909,7 @@ public SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync( @@ -930,7 +930,7 @@ private Mono restartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync( @@ -984,7 +984,8 @@ public void restart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the information of role instance of vendor network function. + * @return the information of role instance of vendor network function along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1043,7 +1044,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the information of role instance of vendor network function. + * @return the information of role instance of vendor network function along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1098,7 +1100,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the information of role instance of vendor network function. + * @return the information of role instance of vendor network function on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -1142,7 +1144,7 @@ public RoleInstanceInner get(String locationName, String vendorName, String serv * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the information of role instance of vendor network function. + * @return the information of role instance of vendor network function along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -1159,7 +1161,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1221,7 +1224,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1279,7 +1283,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String vendorName, String serviceKey) { @@ -1298,7 +1302,7 @@ private PagedFlux listAsync(String locationName, String vendo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1317,7 +1321,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String locationName, String vendorName, String serviceKey) { @@ -1334,7 +1338,7 @@ public PagedIterable list(String locationName, String vendorN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -1349,7 +1353,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1385,7 +1390,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesImpl.java index bd6ed07695cb..5b288df63b5c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.hybridnetwork.fluent.models.RoleInstanceInner; import com.azure.resourcemanager.hybridnetwork.models.RoleInstance; import com.azure.resourcemanager.hybridnetwork.models.RoleInstances; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class RoleInstancesImpl implements RoleInstances { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoleInstancesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RoleInstancesImpl.class); private final RoleInstancesClient innerClient; diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/SkuCredentialImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/SkuCredentialImpl.java new file mode 100644 index 000000000000..b294994b303f --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/SkuCredentialImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.implementation; + +import com.azure.resourcemanager.hybridnetwork.fluent.models.SkuCredentialInner; +import com.azure.resourcemanager.hybridnetwork.models.SkuCredential; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class SkuCredentialImpl implements SkuCredential { + private SkuCredentialInner innerObject; + + private final com.azure.resourcemanager.hybridnetwork.HybridNetworkManager serviceManager; + + SkuCredentialImpl( + SkuCredentialInner innerObject, com.azure.resourcemanager.hybridnetwork.HybridNetworkManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String username() { + return this.innerModel().username(); + } + + public String acrToken() { + return this.innerModel().acrToken(); + } + + public String acrServerUrl() { + return this.innerModel().acrServerUrl(); + } + + public List repositories() { + List inner = this.innerModel().repositories(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OffsetDateTime expiry() { + return this.innerModel().expiry(); + } + + public SkuCredentialInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsClientImpl.java index f46222fa8b71..f4e5ced3a5bd 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.VendorNetworkFunctionsClient; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in VendorNetworkFunctionsClient. */ public final class VendorNetworkFunctionsClientImpl implements VendorNetworkFunctionsClient { - private final ClientLogger logger = new ClientLogger(VendorNetworkFunctionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VendorNetworkFunctionsService service; @@ -136,7 +133,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -189,7 +187,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -238,7 +237,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String locationName, String vendorName, String serviceKey) { @@ -279,7 +278,7 @@ public VendorNetworkFunctionInner get(String locationName, String vendorName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -298,7 +297,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return vendor network function sub resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -359,7 +359,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return vendor network function sub resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -420,9 +421,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return the {@link PollerFlux} for polling of vendor network function sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VendorNetworkFunctionInner> beginCreateOrUpdateAsync( String locationName, String vendorName, String serviceKey, VendorNetworkFunctionInner parameters) { Mono>> mono = @@ -434,7 +435,7 @@ private PollerFlux, VendorNetworkFunction this.client.getHttpPipeline(), VendorNetworkFunctionInner.class, VendorNetworkFunctionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -449,9 +450,9 @@ private PollerFlux, VendorNetworkFunction * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return the {@link PollerFlux} for polling of vendor network function sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VendorNetworkFunctionInner> beginCreateOrUpdateAsync( String locationName, String vendorName, @@ -482,9 +483,9 @@ private PollerFlux, VendorNetworkFunction * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return the {@link SyncPoller} for polling of vendor network function sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VendorNetworkFunctionInner> beginCreateOrUpdate( String locationName, String vendorName, String serviceKey, VendorNetworkFunctionInner parameters) { return beginCreateOrUpdateAsync(locationName, vendorName, serviceKey, parameters).getSyncPoller(); @@ -502,9 +503,9 @@ public SyncPoller, VendorNetworkFunctionI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return the {@link SyncPoller} for polling of vendor network function sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VendorNetworkFunctionInner> beginCreateOrUpdate( String locationName, String vendorName, @@ -525,7 +526,7 @@ public SyncPoller, VendorNetworkFunctionI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return vendor network function sub resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -547,7 +548,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor network function sub resource. + * @return vendor network function sub resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -615,7 +616,8 @@ public VendorNetworkFunctionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -676,7 +678,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -733,7 +736,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String vendorName, String filter) { @@ -750,7 +753,7 @@ private PagedFlux listAsync(String locationName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String vendorName) { @@ -771,7 +774,7 @@ private PagedFlux listAsync(String locationName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -790,7 +793,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String locationName, String vendorName) { @@ -810,7 +813,7 @@ public PagedIterable list(String locationName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -825,7 +828,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -861,7 +865,8 @@ private Mono> listNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsImpl.java index 4e6b0a5cbc08..f1178f6a130b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorNetworkFunctionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorNetworkFunctionInner; import com.azure.resourcemanager.hybridnetwork.models.VendorNetworkFunction; import com.azure.resourcemanager.hybridnetwork.models.VendorNetworkFunctions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VendorNetworkFunctionsImpl implements VendorNetworkFunctions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorNetworkFunctionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VendorNetworkFunctionsImpl.class); private final VendorNetworkFunctionsClient innerClient; @@ -68,21 +67,21 @@ public PagedIterable list( public VendorNetworkFunction getById(String id) { String locationName = Utils.getValueFromIdByName(id, "locations"); if (locationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String serviceKey = Utils.getValueFromIdByName(id, "networkFunctions"); if (serviceKey == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -95,21 +94,21 @@ public VendorNetworkFunction getById(String id) { public Response getByIdWithResponse(String id, Context context) { String locationName = Utils.getValueFromIdByName(id, "locations"); if (locationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); } String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String serviceKey = Utils.getValueFromIdByName(id, "networkFunctions"); if (serviceKey == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuImpl.java index 4fbe813d45da..ef56fc3c5f75 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuImpl.java @@ -4,12 +4,14 @@ package com.azure.resourcemanager.hybridnetwork.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorSkuInner; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionTemplate; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionType; import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState; +import com.azure.resourcemanager.hybridnetwork.models.SkuCredential; import com.azure.resourcemanager.hybridnetwork.models.SkuDeploymentMode; import com.azure.resourcemanager.hybridnetwork.models.SkuType; import com.azure.resourcemanager.hybridnetwork.models.VendorSku; @@ -154,6 +156,14 @@ public VendorSku refresh(Context context) { return this; } + public SkuCredential listCredential() { + return serviceManager.vendorSkus().listCredential(vendorName, skuName); + } + + public Response listCredentialWithResponse(Context context) { + return serviceManager.vendorSkus().listCredentialWithResponse(vendorName, skuName, context); + } + public VendorSkuImpl withSkuType(SkuType skuType) { this.innerModel().withSkuType(skuType); return this; diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsClientImpl.java index 886a8f38a1a6..edc910d153b4 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.VendorSkuPreviewsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in VendorSkuPreviewsClient. */ public final class VendorSkuPreviewsClientImpl implements VendorSkuPreviewsClient { - private final ClientLogger logger = new ClientLogger(VendorSkuPreviewsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VendorSkuPreviewsService service; @@ -150,7 +147,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vendorName, String skuName) { @@ -206,7 +204,8 @@ private Mono> listSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -259,7 +258,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String vendorName, String skuName) { @@ -276,7 +275,7 @@ private PagedFlux listAsync(String vendorName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String vendorName, String skuName, Context context) { @@ -293,7 +292,7 @@ private PagedFlux listAsync(String vendorName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vendorName, String skuName) { @@ -309,7 +308,7 @@ public PagedIterable list(String vendorName, String sk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vendorName, String skuName, Context context) { @@ -326,7 +325,8 @@ public PagedIterable list(String vendorName, String sk * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return customer subscription which can use a sku along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -387,7 +387,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return customer subscription which can use a sku along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -448,9 +449,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return the {@link PollerFlux} for polling of customer subscription which can use a sku. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PreviewSubscriptionInner> beginCreateOrUpdateAsync( String vendorName, String skuName, String previewSubscription, PreviewSubscriptionInner parameters) { Mono>> mono = @@ -462,7 +463,7 @@ private PollerFlux, PreviewSubscriptionInne this.client.getHttpPipeline(), PreviewSubscriptionInner.class, PreviewSubscriptionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -476,9 +477,9 @@ private PollerFlux, PreviewSubscriptionInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return the {@link PollerFlux} for polling of customer subscription which can use a sku. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PreviewSubscriptionInner> beginCreateOrUpdateAsync( String vendorName, String skuName, @@ -508,9 +509,9 @@ private PollerFlux, PreviewSubscriptionInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return the {@link SyncPoller} for polling of customer subscription which can use a sku. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PreviewSubscriptionInner> beginCreateOrUpdate( String vendorName, String skuName, String previewSubscription, PreviewSubscriptionInner parameters) { return beginCreateOrUpdateAsync(vendorName, skuName, previewSubscription, parameters).getSyncPoller(); @@ -527,9 +528,9 @@ public SyncPoller, PreviewSubscriptionInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return the {@link SyncPoller} for polling of customer subscription which can use a sku. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PreviewSubscriptionInner> beginCreateOrUpdate( String vendorName, String skuName, @@ -549,7 +550,7 @@ public SyncPoller, PreviewSubscriptionInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return customer subscription which can use a sku on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -570,7 +571,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return customer subscription which can use a sku. + * @return customer subscription which can use a sku on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -634,7 +635,8 @@ public PreviewSubscriptionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -688,7 +690,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -738,7 +741,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String vendorName, String skuName, String previewSubscription) { @@ -779,7 +782,7 @@ public PreviewSubscriptionInner get(String vendorName, String skuName, String pr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -796,7 +799,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -850,7 +853,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -900,15 +903,16 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String vendorName, String skuName, String previewSubscription) { Mono>> mono = deleteWithResponseAsync(vendorName, skuName, previewSubscription); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -921,9 +925,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String vendorName, String skuName, String previewSubscription, Context context) { context = this.client.mergeContext(context); @@ -943,9 +947,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String vendorName, String skuName, String previewSubscription) { return beginDeleteAsync(vendorName, skuName, previewSubscription).getSyncPoller(); @@ -961,9 +965,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String vendorName, String skuName, String previewSubscription, Context context) { return beginDeleteAsync(vendorName, skuName, previewSubscription, context).getSyncPoller(); @@ -978,7 +982,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String vendorName, String skuName, String previewSubscription) { @@ -997,7 +1001,7 @@ private Mono deleteAsync(String vendorName, String skuName, String preview * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String vendorName, String skuName, String previewSubscription, Context context) { @@ -1044,7 +1048,8 @@ public void delete(String vendorName, String skuName, String previewSubscription * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1080,7 +1085,8 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsImpl.java index 942895fafa34..8a90ccc8c999 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkuPreviewsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.hybridnetwork.fluent.models.PreviewSubscriptionInner; import com.azure.resourcemanager.hybridnetwork.models.PreviewSubscription; import com.azure.resourcemanager.hybridnetwork.models.VendorSkuPreviews; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VendorSkuPreviewsImpl implements VendorSkuPreviews { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorSkuPreviewsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VendorSkuPreviewsImpl.class); private final VendorSkuPreviewsClient innerClient; @@ -74,21 +73,21 @@ public void delete(String vendorName, String skuName, String previewSubscription public PreviewSubscription getById(String id) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); } String previewSubscription = Utils.getValueFromIdByName(id, "previewSubscriptions"); if (previewSubscription == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -102,21 +101,21 @@ public PreviewSubscription getById(String id) { public Response getByIdWithResponse(String id, Context context) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); } String previewSubscription = Utils.getValueFromIdByName(id, "previewSubscriptions"); if (previewSubscription == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -130,21 +129,21 @@ public Response getByIdWithResponse(String id, Context cont public void deleteById(String id) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); } String previewSubscription = Utils.getValueFromIdByName(id, "previewSubscriptions"); if (previewSubscription == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,21 +157,21 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); } String previewSubscription = Utils.getValueFromIdByName(id, "previewSubscriptions"); if (previewSubscription == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusClientImpl.java index b10d368cce9a..3e1809305388 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -29,10 +30,10 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.VendorSkusClient; +import com.azure.resourcemanager.hybridnetwork.fluent.models.SkuCredentialInner; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorSkuInner; import com.azure.resourcemanager.hybridnetwork.models.VendorSkuListResult; import java.nio.ByteBuffer; @@ -41,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in VendorSkusClient. */ public final class VendorSkusClientImpl implements VendorSkusClient { - private final ClientLogger logger = new ClientLogger(VendorSkusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VendorSkusService service; @@ -125,6 +124,21 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus" + + "/{skuName}/listCredential") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCredential( + @HostParam("$host") String endpoint, + @PathParam("vendorName") String vendorName, + @PathParam("skuName") String skuName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -144,7 +158,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String vendorName, String skuName) { @@ -191,7 +205,7 @@ private Mono>> deleteWithResponseAsync(String vendorNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -235,14 +249,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String vendorName, String skuName) { Mono>> mono = deleteWithResponseAsync(vendorName, skuName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -254,9 +269,9 @@ private PollerFlux, Void> beginDeleteAsync(String vendorName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String vendorName, String skuName, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(vendorName, skuName, context); @@ -273,9 +288,9 @@ private PollerFlux, Void> beginDeleteAsync(String vendorName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vendorName, String skuName) { return beginDeleteAsync(vendorName, skuName).getSyncPoller(); } @@ -289,9 +304,9 @@ public SyncPoller, Void> beginDelete(String vendorName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vendorName, String skuName, Context context) { return beginDeleteAsync(vendorName, skuName, context).getSyncPoller(); } @@ -304,7 +319,7 @@ public SyncPoller, Void> beginDelete(String vendorName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String vendorName, String skuName) { @@ -320,7 +335,7 @@ private Mono deleteAsync(String vendorName, String skuName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String vendorName, String skuName, Context context) { @@ -364,7 +379,7 @@ public void delete(String vendorName, String skuName, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vendorName, String skuName) { @@ -411,7 +426,7 @@ private Mono> getWithResponseAsync(String vendorName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vendorName, String skuName, Context context) { @@ -454,7 +469,7 @@ private Mono> getWithResponseAsync(String vendorName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String vendorName, String skuName) { @@ -493,7 +508,7 @@ public VendorSkuInner get(String vendorName, String skuName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vendorName, String skuName, Context context) { @@ -509,7 +524,7 @@ public Response getWithResponse(String vendorName, String skuNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return sku sub resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -564,7 +579,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return sku sub resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -615,16 +630,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return the {@link PollerFlux} for polling of sku sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VendorSkuInner> beginCreateOrUpdateAsync( String vendorName, String skuName, VendorSkuInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(vendorName, skuName, parameters); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), VendorSkuInner.class, VendorSkuInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + VendorSkuInner.class, + VendorSkuInner.class, + this.client.getContext()); } /** @@ -637,9 +656,9 @@ private PollerFlux, VendorSkuInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return the {@link PollerFlux} for polling of sku sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VendorSkuInner> beginCreateOrUpdateAsync( String vendorName, String skuName, VendorSkuInner parameters, Context context) { context = this.client.mergeContext(context); @@ -660,9 +679,9 @@ private PollerFlux, VendorSkuInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return the {@link SyncPoller} for polling of sku sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VendorSkuInner> beginCreateOrUpdate( String vendorName, String skuName, VendorSkuInner parameters) { return beginCreateOrUpdateAsync(vendorName, skuName, parameters).getSyncPoller(); @@ -678,9 +697,9 @@ public SyncPoller, VendorSkuInner> beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return the {@link SyncPoller} for polling of sku sub resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VendorSkuInner> beginCreateOrUpdate( String vendorName, String skuName, VendorSkuInner parameters, Context context) { return beginCreateOrUpdateAsync(vendorName, skuName, parameters, context).getSyncPoller(); @@ -695,7 +714,7 @@ public SyncPoller, VendorSkuInner> beginCreateOrUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return sku sub resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String vendorName, String skuName, VendorSkuInner parameters) { @@ -714,7 +733,7 @@ private Mono createOrUpdateAsync(String vendorName, String skuNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sku sub resource. + * @return sku sub resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -765,7 +784,8 @@ public VendorSkuInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vendorName) { @@ -816,7 +836,8 @@ private Mono> listSinglePageAsync(String vendorNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vendorName, Context context) { @@ -863,7 +884,7 @@ private Mono> listSinglePageAsync(String vendorNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String vendorName) { @@ -878,7 +899,7 @@ private PagedFlux listAsync(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String vendorName, Context context) { @@ -893,7 +914,7 @@ private PagedFlux listAsync(String vendorName, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vendorName) { @@ -908,13 +929,158 @@ public PagedIterable list(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vendorName, Context context) { return new PagedIterable<>(listAsync(vendorName, context)); } + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCredentialWithResponseAsync(String vendorName, String skuName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (vendorName == null) { + return Mono.error(new IllegalArgumentException("Parameter vendorName is required and cannot be null.")); + } + if (skuName == null) { + return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listCredential( + this.client.getEndpoint(), + vendorName, + skuName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCredentialWithResponseAsync( + String vendorName, String skuName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (vendorName == null) { + return Mono.error(new IllegalArgumentException("Parameter vendorName is required and cannot be null.")); + } + if (skuName == null) { + return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listCredential( + this.client.getEndpoint(), + vendorName, + skuName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context); + } + + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listCredentialAsync(String vendorName, String skuName) { + return listCredentialWithResponseAsync(vendorName, skuName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SkuCredentialInner listCredential(String vendorName, String skuName) { + return listCredentialAsync(vendorName, skuName).block(); + } + + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listCredentialWithResponse(String vendorName, String skuName, Context context) { + return listCredentialWithResponseAsync(vendorName, skuName, context).block(); + } + /** * Get the next page of items. * @@ -922,7 +1088,8 @@ public PagedIterable list(String vendorName, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -958,7 +1125,8 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusImpl.java index f6b2330a99e4..2a7246f0ff76 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorSkusImpl.java @@ -10,13 +10,14 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.VendorSkusClient; +import com.azure.resourcemanager.hybridnetwork.fluent.models.SkuCredentialInner; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorSkuInner; +import com.azure.resourcemanager.hybridnetwork.models.SkuCredential; import com.azure.resourcemanager.hybridnetwork.models.VendorSku; import com.azure.resourcemanager.hybridnetwork.models.VendorSkus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VendorSkusImpl implements VendorSkus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorSkusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VendorSkusImpl.class); private final VendorSkusClient innerClient; @@ -68,17 +69,40 @@ public PagedIterable list(String vendorName, Context context) { return Utils.mapPage(inner, inner1 -> new VendorSkuImpl(inner1, this.manager())); } + public SkuCredential listCredential(String vendorName, String skuName) { + SkuCredentialInner inner = this.serviceClient().listCredential(vendorName, skuName); + if (inner != null) { + return new SkuCredentialImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listCredentialWithResponse(String vendorName, String skuName, Context context) { + Response inner = + this.serviceClient().listCredentialWithResponse(vendorName, skuName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SkuCredentialImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public VendorSku getById(String id) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); @@ -89,14 +113,14 @@ public VendorSku getById(String id) { public Response getByIdWithResponse(String id, Context context) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); @@ -107,14 +131,14 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); @@ -125,14 +149,14 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); } String skuName = Utils.getValueFromIdByName(id, "vendorSkus"); if (skuName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendorSkus'.", id))); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsClientImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsClientImpl.java index a79e1a85bf70..f74426721c4b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsClientImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridnetwork.fluent.VendorsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in VendorsClient. */ public final class VendorsClientImpl implements VendorsClient { - private final ClientLogger logger = new ClientLogger(VendorsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VendorsService service; @@ -132,7 +129,7 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String vendorName) { @@ -174,7 +171,7 @@ private Mono>> deleteWithResponseAsync(String vendorNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String vendorName, Context context) { @@ -212,14 +209,15 @@ private Mono>> deleteWithResponseAsync(String vendorNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String vendorName) { Mono>> mono = deleteWithResponseAsync(vendorName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -230,9 +228,9 @@ private PollerFlux, Void> beginDeleteAsync(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String vendorName, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(vendorName, context); @@ -248,9 +246,9 @@ private PollerFlux, Void> beginDeleteAsync(String vendorName, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vendorName) { return beginDeleteAsync(vendorName).getSyncPoller(); } @@ -263,9 +261,9 @@ public SyncPoller, Void> beginDelete(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vendorName, Context context) { return beginDeleteAsync(vendorName, context).getSyncPoller(); } @@ -277,7 +275,7 @@ public SyncPoller, Void> beginDelete(String vendorName, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String vendorName) { @@ -292,7 +290,7 @@ private Mono deleteAsync(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String vendorName, Context context) { @@ -333,7 +331,8 @@ public void delete(String vendorName, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vendorName) { @@ -375,7 +374,8 @@ private Mono> getWithResponseAsync(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vendorName, Context context) { @@ -413,7 +413,7 @@ private Mono> getWithResponseAsync(String vendorName, Cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String vendorName) { @@ -450,7 +450,7 @@ public VendorInner get(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vendorName, Context context) { @@ -465,7 +465,7 @@ public Response getWithResponse(String vendorName, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return vendor resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -513,7 +513,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return vendor resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -557,16 +557,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return the {@link PollerFlux} for polling of vendor resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VendorInner> beginCreateOrUpdateAsync( String vendorName, VendorInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(vendorName, parameters); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), VendorInner.class, VendorInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), VendorInner.class, VendorInner.class, this.client.getContext()); } /** @@ -578,9 +578,9 @@ private PollerFlux, VendorInner> beginCreateOrUpdateAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return the {@link PollerFlux} for polling of vendor resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VendorInner> beginCreateOrUpdateAsync( String vendorName, VendorInner parameters, Context context) { context = this.client.mergeContext(context); @@ -599,9 +599,9 @@ private PollerFlux, VendorInner> beginCreateOrUpdateAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return the {@link SyncPoller} for polling of vendor resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VendorInner> beginCreateOrUpdate( String vendorName, VendorInner parameters) { return beginCreateOrUpdateAsync(vendorName, parameters).getSyncPoller(); @@ -616,9 +616,9 @@ public SyncPoller, VendorInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return the {@link SyncPoller} for polling of vendor resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VendorInner> beginCreateOrUpdate( String vendorName, VendorInner parameters, Context context) { return beginCreateOrUpdateAsync(vendorName, parameters, context).getSyncPoller(); @@ -632,7 +632,7 @@ public SyncPoller, VendorInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return vendor resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String vendorName, VendorInner parameters) { @@ -646,7 +646,7 @@ private Mono createOrUpdateAsync(String vendorName, VendorInner par * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return vendor resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String vendorName) { @@ -663,7 +663,7 @@ private Mono createOrUpdateAsync(String vendorName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return vendor resource. + * @return vendor resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String vendorName, VendorInner parameters, Context context) { @@ -723,7 +723,8 @@ public VendorInner createOrUpdate(String vendorName, VendorInner parameters, Con * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -769,7 +770,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -810,7 +812,7 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -825,7 +827,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -838,7 +840,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -852,7 +854,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -866,7 +868,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -903,7 +906,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsImpl.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsImpl.java index 89ac17c52e23..4396c8d949cd 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsImpl.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/VendorsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorInner; import com.azure.resourcemanager.hybridnetwork.models.Vendor; import com.azure.resourcemanager.hybridnetwork.models.Vendors; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VendorsImpl implements Vendors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VendorsImpl.class); private final VendorsClient innerClient; @@ -71,7 +70,7 @@ public PagedIterable list(Context context) { public Vendor getById(String id) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); @@ -82,7 +81,7 @@ public Vendor getById(String id) { public Response getByIdWithResponse(String id, Context context) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); @@ -93,7 +92,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); @@ -104,7 +103,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String vendorName = Utils.getValueFromIdByName(id, "vendors"); if (vendorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vendors'.", id))); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ActionType.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ActionType.java new file mode 100644 index 000000000000..f00ef4e708b3 --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ActionType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ActionType. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value Internal for ActionType. */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** @return known ActionType values. */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/AzureStackEdgeFormat.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/AzureStackEdgeFormat.java new file mode 100644 index 000000000000..112f0b0eb53a --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/AzureStackEdgeFormat.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SubResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hybridnetwork.fluent.models.DevicePropertiesFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The reference to the Azure stack edge device. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "deviceType") +@JsonTypeName("AzureStackEdge") +@Fluent +public final class AzureStackEdgeFormat extends DevicePropertiesFormat { + /* + * The reference to the Azure stack edge device. + */ + @JsonProperty(value = "azureStackEdge", required = true) + private SubResource azureStackEdge; + + /** + * Get the azureStackEdge property: The reference to the Azure stack edge device. + * + * @return the azureStackEdge value. + */ + public SubResource azureStackEdge() { + return this.azureStackEdge; + } + + /** + * Set the azureStackEdge property: The reference to the Azure stack edge device. + * + * @param azureStackEdge the azureStackEdge value to set. + * @return the AzureStackEdgeFormat object itself. + */ + public AzureStackEdgeFormat withAzureStackEdge(SubResource azureStackEdge) { + this.azureStackEdge = azureStackEdge; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (azureStackEdge() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property azureStackEdge in model AzureStackEdgeFormat")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AzureStackEdgeFormat.class); +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/CustomProfile.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/CustomProfile.java index b294cb5f83ae..812df03c9800 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/CustomProfile.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/CustomProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifies the custom settings for the virtual machine. */ @Fluent public final class CustomProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomProfile.class); - /* * Path for metadata configuration. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DataDisk.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DataDisk.java index 58df45d9cd61..2628bf99ce50 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DataDisk.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DataDisk.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -16,8 +14,6 @@ */ @Fluent public final class DataDisk { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataDisk.class); - /* * Specifies how the virtual machine should be created. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Device.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Device.java index f84a781e15e0..54a587ce18ff 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Device.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Device.java @@ -71,13 +71,6 @@ public interface Device { */ ProvisioningState provisioningState(); - /** - * Gets the azureStackEdge property: The reference to the Azure stack edge device. Once set, it cannot be updated. - * - * @return the azureStackEdge value. - */ - SubResource azureStackEdge(); - /** * Gets the networkFunctions property: The list of network functions deployed on the device. * @@ -150,7 +143,7 @@ interface WithResourceGroup { * The stage of the Device definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAzureStackEdge { + interface WithCreate extends DefinitionStages.WithTags { /** * Executes the create request. * @@ -176,17 +169,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the Device definition allowing to specify azureStackEdge. */ - interface WithAzureStackEdge { - /** - * Specifies the azureStackEdge property: The reference to the Azure stack edge device. Once set, it cannot - * be updated.. - * - * @param azureStackEdge The reference to the Azure stack edge device. Once set, it cannot be updated. - * @return the next definition stage. - */ - WithCreate withAzureStackEdge(SubResource azureStackEdge); - } } /** * Begins update for the Device resource. @@ -256,7 +238,7 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the device registration key. + * @return the device registration key along with {@link Response}. */ Response listRegistrationKeyWithResponse(Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DeviceListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DeviceListResult.java index 53ea47a9b362..a24c8272bd8f 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DeviceListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/DeviceListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.DeviceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response for devices API service call. */ @Fluent public final class DeviceListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeviceListResult.class); - /* * A list of devices. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Devices.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Devices.java index 9d6204626425..3ffc52c5ec21 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Devices.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Devices.java @@ -54,7 +54,7 @@ public interface Devices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String deviceName, Context context); @@ -63,7 +63,7 @@ public interface Devices { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -74,7 +74,7 @@ public interface Devices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -85,7 +85,7 @@ public interface Devices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -97,7 +97,7 @@ public interface Devices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for devices API service call. + * @return response for devices API service call as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -122,7 +122,7 @@ public interface Devices { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the device registration key. + * @return the device registration key along with {@link Response}. */ Response listRegistrationKeyWithResponse( String resourceGroupName, String deviceName, Context context); @@ -134,7 +134,7 @@ Response listRegistrationKeyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device along with {@link Response}. */ Device getById(String id); @@ -146,7 +146,7 @@ Response listRegistrationKeyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified device. + * @return information about the specified device along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ExecuteRequestParameters.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ExecuteRequestParameters.java new file mode 100644 index 000000000000..168a9a32dc9f --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ExecuteRequestParameters.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Payload for execute request post call. */ +@Fluent +public final class ExecuteRequestParameters { + /* + * The endpoint of service to call. + */ + @JsonProperty(value = "serviceEndpoint", required = true) + private String serviceEndpoint; + + /* + * The request metadata. + */ + @JsonProperty(value = "requestMetadata", required = true) + private RequestMetadata requestMetadata; + + /** + * Get the serviceEndpoint property: The endpoint of service to call. + * + * @return the serviceEndpoint value. + */ + public String serviceEndpoint() { + return this.serviceEndpoint; + } + + /** + * Set the serviceEndpoint property: The endpoint of service to call. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @return the ExecuteRequestParameters object itself. + */ + public ExecuteRequestParameters withServiceEndpoint(String serviceEndpoint) { + this.serviceEndpoint = serviceEndpoint; + return this; + } + + /** + * Get the requestMetadata property: The request metadata. + * + * @return the requestMetadata value. + */ + public RequestMetadata requestMetadata() { + return this.requestMetadata; + } + + /** + * Set the requestMetadata property: The request metadata. + * + * @param requestMetadata the requestMetadata value to set. + * @return the ExecuteRequestParameters object itself. + */ + public ExecuteRequestParameters withRequestMetadata(RequestMetadata requestMetadata) { + this.requestMetadata = requestMetadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceEndpoint() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property serviceEndpoint in model ExecuteRequestParameters")); + } + if (requestMetadata() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property requestMetadata in model ExecuteRequestParameters")); + } else { + requestMetadata().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExecuteRequestParameters.class); +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/HttpMethod.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/HttpMethod.java new file mode 100644 index 000000000000..fa0c501f376c --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/HttpMethod.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for HttpMethod. */ +public final class HttpMethod extends ExpandableStringEnum { + /** Static value Unknown for HttpMethod. */ + public static final HttpMethod UNKNOWN = fromString("Unknown"); + + /** Static value Post for HttpMethod. */ + public static final HttpMethod POST = fromString("Post"); + + /** Static value Put for HttpMethod. */ + public static final HttpMethod PUT = fromString("Put"); + + /** Static value Get for HttpMethod. */ + public static final HttpMethod GET = fromString("Get"); + + /** Static value Patch for HttpMethod. */ + public static final HttpMethod PATCH = fromString("Patch"); + + /** Static value Delete for HttpMethod. */ + public static final HttpMethod DELETE = fromString("Delete"); + + /** + * Creates or finds a HttpMethod from its string representation. + * + * @param name a name to look for. + * @return the corresponding HttpMethod. + */ + @JsonCreator + public static HttpMethod fromString(String name) { + return fromString(name, HttpMethod.class); + } + + /** @return known HttpMethod values. */ + public static Collection values() { + return values(HttpMethod.class); + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ImageReference.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ImageReference.java index 72611b656f34..965fce4075e3 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ImageReference.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/ImageReference.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The image reference properties. */ @Fluent public final class ImageReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageReference.class); - /* * The image publisher. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/LinuxConfiguration.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/LinuxConfiguration.java index 3bba870d6777..1aaff20a4074 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/LinuxConfiguration.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/LinuxConfiguration.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifies the Linux operating system settings on the virtual machine. */ @Fluent public final class LinuxConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LinuxConfiguration.class); - /* * Specifies the ssh key configuration for a Linux OS. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunction.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunction.java index 11b3f29428d8..685954ff2071 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunction.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunction.java @@ -367,4 +367,25 @@ interface WithTags { * @return the refreshed resource. */ NetworkFunction refresh(Context context); + + /** + * Execute a request to services on a network function. + * + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void executeRequest(ExecuteRequestParameters parameters); + + /** + * Execute a request to services on a network function. + * + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void executeRequest(ExecuteRequestParameters parameters, Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionListResult.java index 6f8fdfa74188..b24504c9ab41 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response for network function API service call. */ @Fluent public final class NetworkFunctionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionListResult.class); - /* * A list of network function resources in a subscription or resource * group. diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleConfiguration.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleConfiguration.java index 6e4a7df6012f..93de49d890ab 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleConfiguration.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Network function role configuration. */ @Fluent public final class NetworkFunctionRoleConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionRoleConfiguration.class); - /* * The name of the network function role. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleInstanceListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleInstanceListResult.java index dacbccab5a9b..706671c1df57 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleInstanceListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionRoleInstanceListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.RoleInstanceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** List of role instances of vendor network function. */ @Immutable public final class NetworkFunctionRoleInstanceListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionRoleInstanceListResult.class); - /* * A list of role instances. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuDetails.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuDetails.java index 03021d7b64be..4be2c6bec758 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuDetails.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuDetails.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionSkuRoleDetailsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network function sku details. */ @Fluent public final class NetworkFunctionSkuDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionSkuDetails.class); - /* * The network function sku type. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuListResult.java index 3018427552c7..eb194b57189d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionSkuListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.SkuOverviewInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of available network function skus. */ @Fluent public final class NetworkFunctionSkuListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionSkuListResult.class); - /* * The network function vendor sku overview properties. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionTemplate.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionTemplate.java index afad904d795c..7352085eb98d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionTemplate.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionTemplate.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network function template. */ @Fluent public final class NetworkFunctionTemplate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionTemplate.class); - /* * An array of network function role definitions. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfiguration.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfiguration.java index 96f6be144835..e6035a34e227 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfiguration.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network function user configuration. */ @Fluent public final class NetworkFunctionUserConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionUserConfiguration.class); - /* * The name of the network function role. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfigurationOsProfile.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfigurationOsProfile.java index ec32e754dc02..6adf498f374c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfigurationOsProfile.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionUserConfigurationOsProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifies the operating system settings for the role instance. */ @Fluent public final class NetworkFunctionUserConfigurationOsProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionUserConfigurationOsProfile.class); - /* * Specifies a base-64 encoded string of custom data. The base-64 encoded * string is decoded to a binary array that is saved as a file on the diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorConfiguration.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorConfiguration.java index 22d5ef9676fe..aab8873bffb5 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorConfiguration.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Network function vendor configuration. */ @Fluent public final class NetworkFunctionVendorConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionVendorConfiguration.class); - /* * The name of the vendor network function role. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorListResult.java index 8d558391f7f0..541b7b834eda 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionVendorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The network function vendor list result. */ @Fluent public final class NetworkFunctionVendorListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFunctionVendorListResult.class); - /* * A list of available network function vendors and skus. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorSkus.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorSkus.java index 17ace6054c56..4c8c3bbb8687 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorSkus.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendorSkus.java @@ -16,7 +16,7 @@ public interface NetworkFunctionVendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedIterable}. */ PagedIterable listByVendor(String vendorName); @@ -28,7 +28,7 @@ public interface NetworkFunctionVendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of available network function skus. + * @return a list of available network function skus as paginated response with {@link PagedIterable}. */ PagedIterable listByVendor(String vendorName, Context context); @@ -40,7 +40,7 @@ public interface NetworkFunctionVendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedIterable}. */ PagedIterable listBySku(String vendorName, String vendorSkuName); @@ -53,7 +53,7 @@ public interface NetworkFunctionVendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function sku details. + * @return the network function sku details as paginated response with {@link PagedIterable}. */ PagedIterable listBySku(String vendorName, String vendorSkuName, Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendors.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendors.java index 2f0db3f91f85..44d0633d112f 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendors.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctionVendors.java @@ -14,7 +14,7 @@ public interface NetworkFunctionVendors { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface NetworkFunctionVendors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the network function vendor list result. + * @return the network function vendor list result as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctions.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctions.java index 1f3387419b52..c88eb6f001dd 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctions.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkFunctions.java @@ -56,7 +56,7 @@ public interface NetworkFunctions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String networkFunctionName, Context context); @@ -66,7 +66,7 @@ Response getByResourceGroupWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -77,7 +77,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -88,7 +88,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -100,10 +100,36 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for network function API service call. + * @return response for network function API service call as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void executeRequest(String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters); + + /** + * Execute a request to services on a network function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFunctionName The name of the network function. + * @param parameters Payload for execute request post call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void executeRequest( + String resourceGroupName, String networkFunctionName, ExecuteRequestParameters parameters, Context context); + /** * Gets information about the specified network function resource. * @@ -111,7 +137,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource along with {@link Response}. */ NetworkFunction getById(String id); @@ -123,7 +149,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified network function resource. + * @return information about the specified network function resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterface.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterface.java index 8be48f9cc381..932e816c553d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterface.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterface.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Network interface properties. */ @Fluent public final class NetworkInterface { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkInterface.class); - /* * The name of the network interface. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterfaceIpConfiguration.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterfaceIpConfiguration.java index 926234bbea03..c63c5b0dc5ce 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterfaceIpConfiguration.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/NetworkInterfaceIpConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Network interface IP configuration properties. */ @Fluent public final class NetworkInterfaceIpConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkInterfaceIpConfiguration.class); - /* * IP address allocation method. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operation.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operation.java index 11c12247af23..96f57a7fc98e 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operation.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operation.java @@ -9,19 +9,44 @@ /** An immutable client-side representation of Operation. */ public interface Operation { /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". * * @return the name value. */ String name(); /** - * Gets the display property: The object that represents the operation. + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. * * @return the display value. */ OperationDisplay display(); + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + /** * Gets the inner com.azure.resourcemanager.hybridnetwork.fluent.models.OperationInner object. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationDisplay.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationDisplay.java index fadf9a655277..a5856ed79873 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationDisplay.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationDisplay.java @@ -4,43 +4,44 @@ package com.azure.resourcemanager.hybridnetwork.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The object that represents the operation. */ -@Fluent +/** Localized display information for this particular operation. */ +@Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* - * Service provider: Microsoft.HybridNetwork. + * The localized friendly form of the resource provider name, e.g. + * "Microsoft Monitoring Insights" or "Microsoft Compute". */ - @JsonProperty(value = "provider") + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* - * Resource on which the operation is performed: Registration definition, - * registration assignment, etc. + * The localized friendly name of the resource type related to this + * operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ - @JsonProperty(value = "resource") + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* - * Operation type: Read, write, delete, etc. + * The concise, localized friendly name for the operation; suitable for + * dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual + * Machine". */ - @JsonProperty(value = "operation") + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* - * Description of the operation. + * The short, localized friendly description of the operation; suitable for + * tool tips and detailed views. */ - @JsonProperty(value = "description") + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /** - * Get the provider property: Service provider: Microsoft.HybridNetwork. + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". * * @return the provider value. */ @@ -49,19 +50,8 @@ public String provider() { } /** - * Set the provider property: Service provider: Microsoft.HybridNetwork. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource on which the operation is performed: Registration definition, registration - * assignment, etc. + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". * * @return the resource value. */ @@ -70,19 +60,8 @@ public String resource() { } /** - * Set the resource property: Resource on which the operation is performed: Registration definition, registration - * assignment, etc. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Operation type: Read, write, delete, etc. + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". * * @return the operation value. */ @@ -91,18 +70,8 @@ public String operation() { } /** - * Set the operation property: Operation type: Read, write, delete, etc. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Description of the operation. + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. * * @return the description value. */ @@ -110,17 +79,6 @@ public String description() { return this.description; } - /** - * Set the description property: Description of the operation. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - /** * Validates the instance. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationList.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationListResult.java similarity index 69% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationList.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationListResult.java index cfb7b2405def..fe6533912720 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationList.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OperationListResult.java @@ -5,31 +5,30 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of the operations. */ +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ @Immutable -public final class OperationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationList.class); - +public final class OperationListResult { /* - * A list of Microsoft.HybridNetwork operations. + * List of operations supported by the resource provider */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* - * The URL to get the next set of results. + * URL to get the next set of operation list results (if there are any). */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; /** - * Get the value property: A list of Microsoft.HybridNetwork operations. + * Get the value property: List of operations supported by the resource provider. * * @return the value value. */ @@ -38,7 +37,7 @@ public List value() { } /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: URL to get the next set of operation list results (if there are any). * * @return the nextLink value. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operations.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operations.java index b5fe8a18c6bc..13c9dc430c81 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operations.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Operations.java @@ -14,7 +14,7 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the operations. + * @return a list of the operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Origin.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Origin.java new file mode 100644 index 000000000000..f8fdaadaff23 --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Origin.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Origin. */ +public final class Origin extends ExpandableStringEnum { + /** Static value user for Origin. */ + public static final Origin USER = fromString("user"); + + /** Static value system for Origin. */ + public static final Origin SYSTEM = fromString("system"); + + /** Static value user,system for Origin. */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** @return known Origin values. */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsDisk.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsDisk.java index 6d6c29af92fa..a42b511a5832 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsDisk.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsDisk.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -16,8 +14,6 @@ */ @Fluent public final class OsDisk { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OsDisk.class); - /* * The OS type. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsProfile.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsProfile.java index 25fbd46fad48..d8c138e0c21c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsProfile.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/OsProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifies the operating system settings for the role instance. */ @Fluent public final class OsProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OsProfile.class); - /* * Specifies the name of the administrator account.

**Windows-only * restriction:** Cannot end in "."

**Disallowed values:** diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/PreviewSubscriptionsList.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/PreviewSubscriptionsList.java index 2f6d0e04a90c..c1a538a68da9 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/PreviewSubscriptionsList.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/PreviewSubscriptionsList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.PreviewSubscriptionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of customer subscriptions which can use a sku. */ @Fluent public final class PreviewSubscriptionsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PreviewSubscriptionsList.class); - /* * A list of preview subscriptions. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/RequestMetadata.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/RequestMetadata.java new file mode 100644 index 000000000000..01af2991214b --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/RequestMetadata.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Request metadata of execute request post call payload. */ +@Fluent +public final class RequestMetadata { + /* + * The relative path of the request. + */ + @JsonProperty(value = "relativePath", required = true) + private String relativePath; + + /* + * The http method of the request. + */ + @JsonProperty(value = "httpMethod", required = true) + private HttpMethod httpMethod; + + /* + * The serialized body of the request. + */ + @JsonProperty(value = "serializedBody", required = true) + private String serializedBody; + + /* + * The api version of the request. + */ + @JsonProperty(value = "apiVersion") + private String apiVersion; + + /** + * Get the relativePath property: The relative path of the request. + * + * @return the relativePath value. + */ + public String relativePath() { + return this.relativePath; + } + + /** + * Set the relativePath property: The relative path of the request. + * + * @param relativePath the relativePath value to set. + * @return the RequestMetadata object itself. + */ + public RequestMetadata withRelativePath(String relativePath) { + this.relativePath = relativePath; + return this; + } + + /** + * Get the httpMethod property: The http method of the request. + * + * @return the httpMethod value. + */ + public HttpMethod httpMethod() { + return this.httpMethod; + } + + /** + * Set the httpMethod property: The http method of the request. + * + * @param httpMethod the httpMethod value to set. + * @return the RequestMetadata object itself. + */ + public RequestMetadata withHttpMethod(HttpMethod httpMethod) { + this.httpMethod = httpMethod; + return this; + } + + /** + * Get the serializedBody property: The serialized body of the request. + * + * @return the serializedBody value. + */ + public String serializedBody() { + return this.serializedBody; + } + + /** + * Set the serializedBody property: The serialized body of the request. + * + * @param serializedBody the serializedBody value to set. + * @return the RequestMetadata object itself. + */ + public RequestMetadata withSerializedBody(String serializedBody) { + this.serializedBody = serializedBody; + return this; + } + + /** + * Get the apiVersion property: The api version of the request. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Set the apiVersion property: The api version of the request. + * + * @param apiVersion the apiVersion value to set. + * @return the RequestMetadata object itself. + */ + public RequestMetadata withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (relativePath() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property relativePath in model RequestMetadata")); + } + if (httpMethod() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property httpMethod in model RequestMetadata")); + } + if (serializedBody() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property serializedBody in model RequestMetadata")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RequestMetadata.class); +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/RoleInstances.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/RoleInstances.java index 0ea31792cf98..026b5cc7cfb7 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/RoleInstances.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/RoleInstances.java @@ -116,7 +116,7 @@ public interface RoleInstances { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the information of role instance of vendor network function. + * @return the information of role instance of vendor network function along with {@link Response}. */ Response getWithResponse( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context); @@ -130,7 +130,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName, String vendorName, String serviceKey); @@ -144,7 +144,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of role instances of vendor network function. + * @return list of role instances of vendor network function as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName, String vendorName, String serviceKey, Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SkuCredential.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SkuCredential.java new file mode 100644 index 000000000000..36e9aa2db153 --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SkuCredential.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.models; + +import com.azure.resourcemanager.hybridnetwork.fluent.models.SkuCredentialInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of SkuCredential. */ +public interface SkuCredential { + /** + * Gets the username property: The username of the sku credential. + * + * @return the username value. + */ + String username(); + + /** + * Gets the acrToken property: The credential value. + * + * @return the acrToken value. + */ + String acrToken(); + + /** + * Gets the acrServerUrl property: The Acr server url. + * + * @return the acrServerUrl value. + */ + String acrServerUrl(); + + /** + * Gets the repositories property: The repositories that could be accessed using the current credential. + * + * @return the repositories value. + */ + List repositories(); + + /** + * Gets the expiry property: The UTC time when credential will expire. + * + * @return the expiry value. + */ + OffsetDateTime expiry(); + + /** + * Gets the inner com.azure.resourcemanager.hybridnetwork.fluent.models.SkuCredentialInner object. + * + * @return the inner object. + */ + SkuCredentialInner innerModel(); +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshConfiguration.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshConfiguration.java index 5e4303b66cec..c7c85e87c94b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshConfiguration.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** SSH configuration for Linux based VMs running on Azure. */ @Fluent public final class SshConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SshConfiguration.class); - /* * The list of SSH public keys used to authenticate with linux based VMs. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshPublicKey.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshPublicKey.java index 79809d13d684..b9f05f199b9b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshPublicKey.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/SshPublicKey.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -14,8 +12,6 @@ */ @Fluent public final class SshPublicKey { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SshPublicKey.class); - /* * Specifies the full path on the created VM where ssh public key is * stored. If the file already exists, the specified key is appended to the diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/StorageProfile.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/StorageProfile.java index 05f1eb00a4f7..0466b3011a4a 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/StorageProfile.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/StorageProfile.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Specifies the storage settings for the virtual machine disks. */ @Fluent public final class StorageProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageProfile.class); - /* * The image reference properties. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/TagsObject.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/TagsObject.java index d1e682dd4b08..81886e6267f2 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/TagsObject.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/TagsObject.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.hybridnetwork.models; 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; @@ -14,8 +12,6 @@ /** Tags object for patch operations. */ @Fluent public final class TagsObject { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsObject.class); - /* * Resource tags. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorListResult.java index 55e74879207a..0c3c9dea8edb 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response for vendors API service call. */ @Fluent public final class VendorListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorListResult.class); - /* * A list of vendors. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctionListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctionListResult.java index 66411e04115e..fdb0ebae295a 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctionListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorNetworkFunctionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response for vendors API service call. */ @Fluent public final class VendorNetworkFunctionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorNetworkFunctionListResult.class); - /* * A list of vendor network functions. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctions.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctions.java index 4856aef9efaf..29b1c3dec541 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctions.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorNetworkFunctions.java @@ -33,7 +33,7 @@ public interface VendorNetworkFunctions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function along with {@link Response}. */ Response getWithResponse( String locationName, String vendorName, String serviceKey, Context context); @@ -47,7 +47,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName, String vendorName); @@ -63,7 +63,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName, String vendorName, String filter, Context context); @@ -74,7 +74,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function along with {@link Response}. */ VendorNetworkFunction getById(String id); @@ -86,7 +86,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor network function. + * @return information about the specified vendor network function along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSku.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSku.java index 8d1291e1ef0c..f7f0722de40d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSku.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSku.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.hybridnetwork.models; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorSkuInner; @@ -341,4 +342,24 @@ interface WithNetworkFunctionTemplate { * @return the refreshed resource. */ VendorSku refresh(Context context); + + /** + * Generate credentials for publishing SKU images. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition. + */ + SkuCredential listCredential(); + + /** + * Generate credentials for publishing SKU images. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition along with {@link Response}. + */ + Response listCredentialWithResponse(Context context); } diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuListResult.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuListResult.java index 44c165d578c6..8cca33f5694d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuListResult.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridnetwork.fluent.models.VendorSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response for list vendor sku API service call. */ @Fluent public final class VendorSkuListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VendorSkuListResult.class); - /* * A list of vendor skus offered by the vendor. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuPreviews.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuPreviews.java index 7232da75bd2b..63dc9333f319 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuPreviews.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkuPreviews.java @@ -18,7 +18,7 @@ public interface VendorSkuPreviews { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedIterable}. */ PagedIterable list(String vendorName, String skuName); @@ -31,7 +31,7 @@ public interface VendorSkuPreviews { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of customer subscriptions which can use a sku. + * @return a list of customer subscriptions which can use a sku as paginated response with {@link PagedIterable}. */ PagedIterable list(String vendorName, String skuName, Context context); @@ -58,7 +58,7 @@ public interface VendorSkuPreviews { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku along with {@link Response}. */ Response getWithResponse( String vendorName, String skuName, String previewSubscription, Context context); @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku along with {@link Response}. */ PreviewSubscription getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the preview information of a vendor sku. + * @return the preview information of a vendor sku along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkus.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkus.java index 10414d5aab28..6893b0b4da50 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkus.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VendorSkus.java @@ -54,7 +54,7 @@ public interface VendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku along with {@link Response}. */ Response getWithResponse(String vendorName, String skuName, Context context); @@ -65,7 +65,7 @@ public interface VendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(String vendorName); @@ -77,10 +77,35 @@ public interface VendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for list vendor sku API service call. + * @return response for list vendor sku API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(String vendorName, Context context); + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition. + */ + SkuCredential listCredential(String vendorName, String skuName); + + /** + * Generate credentials for publishing SKU images. + * + * @param vendorName The name of the vendor. + * @param skuName The name of the sku. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Sku credential definition along with {@link Response}. + */ + Response listCredentialWithResponse(String vendorName, String skuName, Context context); + /** * Gets information about the specified sku. * @@ -88,7 +113,7 @@ public interface VendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku along with {@link Response}. */ VendorSku getById(String id); @@ -100,7 +125,7 @@ public interface VendorSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified sku. + * @return information about the specified sku along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Vendors.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Vendors.java index ebd01a1a9b5d..9aa492e13b6c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Vendors.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/Vendors.java @@ -50,7 +50,7 @@ public interface Vendors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor along with {@link Response}. */ Response getWithResponse(String vendorName, Context context); @@ -59,7 +59,7 @@ public interface Vendors { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -70,7 +70,7 @@ public interface Vendors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for vendors API service call. + * @return response for vendors API service call as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -81,7 +81,7 @@ public interface Vendors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor along with {@link Response}. */ Vendor getById(String id); @@ -93,7 +93,7 @@ public interface Vendors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified vendor. + * @return information about the specified vendor along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VirtualHardDisk.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VirtualHardDisk.java index 18207531da70..1ba363490655 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VirtualHardDisk.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/VirtualHardDisk.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.hybridnetwork.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes the uri of a disk. */ @Fluent public final class VirtualHardDisk { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualHardDisk.class); - /* * Specifies the virtual hard disk's uri. */ diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesCreateOrUpdateSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesCreateOrUpdateSamples.java deleted file mode 100644 index 8694fac5fdf7..000000000000 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +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.hybridnetwork; - -import com.azure.core.management.SubResource; - -/** Samples for Devices CreateOrUpdate. */ -public final class DevicesCreateOrUpdateSamples { - /** - * Sample code: Create or update device. - * - * @param manager Entry point to HybridNetworkManager. - */ - public static void createOrUpdateDevice(com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { - manager - .devices() - .define("TestDevice") - .withRegion("eastus") - .withExistingResourceGroup("rg1") - .withAzureStackEdge( - new SubResource() - .withId( - "/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName")) - .create(); - } -} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorsListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorsListSamples.java deleted file mode 100644 index 42ae177772cd..000000000000 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorsListSamples.java +++ /dev/null @@ -1,19 +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.hybridnetwork; - -import com.azure.core.util.Context; - -/** Samples for NetworkFunctionVendors List. */ -public final class NetworkFunctionVendorsListSamples { - /** - * Sample code: List vendors and skus. - * - * @param manager Entry point to HybridNetworkManager. - */ - public static void listVendorsAndSkus(com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { - manager.networkFunctionVendors().list(Context.NONE); - } -} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesCreateOrUpdateSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e61db655df58 --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesCreateOrUpdateSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.generated; + +/** Samples for Devices CreateOrUpdate. */ +public final class DevicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceCreate.json + */ + /** + * Sample code: Create or update device. + * + * @param manager Entry point to HybridNetworkManager. + */ + public static void createOrUpdateDevice(com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { + manager.devices().define("TestDevice").withRegion("eastus").withExistingResourceGroup("rg1").create(); + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesDeleteSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesDeleteSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesDeleteSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesDeleteSamples.java index fc5535186e7d..e7278bfbdc2b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesDeleteSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesDeleteSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Devices Delete. */ public final class DevicesDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceDelete.json + */ /** * Sample code: Delete device resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesGetByResourceGroupSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesGetByResourceGroupSamples.java similarity index 74% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesGetByResourceGroupSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesGetByResourceGroupSamples.java index e43098359d7f..4994eb5761c1 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesGetByResourceGroupSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesGetByResourceGroupSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Devices GetByResourceGroup. */ public final class DevicesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceGet.json + */ /** * Sample code: Get device resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListByResourceGroupSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListByResourceGroupSamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListByResourceGroupSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListByResourceGroupSamples.java index 4c4ceeb89143..0881e58535dd 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListByResourceGroupSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListByResourceGroupSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Devices ListByResourceGroup. */ public final class DevicesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceListByResourceGroup.json + */ /** * Sample code: List all devices in resource group. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListRegistrationKeySamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListRegistrationKeySamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListRegistrationKeySamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListRegistrationKeySamples.java index 1861ce65958b..cf803f6be18d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListRegistrationKeySamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListRegistrationKeySamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Devices ListRegistrationKey. */ public final class DevicesListRegistrationKeySamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceListRegistrationKey.json + */ /** * Sample code: Get device registration key. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListSamples.java similarity index 71% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListSamples.java index 27d6d6f1b22a..ca1d844653bd 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Devices List. */ public final class DevicesListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceListBySubscription.json + */ /** * Sample code: List all devices in a subscription. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesUpdateTagsSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesUpdateTagsSamples.java similarity index 84% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesUpdateTagsSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesUpdateTagsSamples.java index 633d9e5fbf84..8e210839eb8d 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/DevicesUpdateTagsSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/DevicesUpdateTagsSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.hybridnetwork.models.Device; @@ -11,6 +11,9 @@ /** Samples for Devices UpdateTags. */ public final class DevicesUpdateTagsSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/DeviceUpdateTags.json + */ /** * Sample code: Update hybrid network device tags. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorSkusListBySkuSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorSkusListBySkuSamples.java similarity index 74% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorSkusListBySkuSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorSkusListBySkuSamples.java index 53ded54fab0a..64e0fe9542db 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorSkusListBySkuSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorSkusListBySkuSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for NetworkFunctionVendorSkus ListBySku. */ public final class NetworkFunctionVendorSkusListBySkuSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionSkuDetailsGet.json + */ /** * Sample code: Get network function sku details. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorSkusListByVendorSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorSkusListByVendorSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorSkusListByVendorSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorSkusListByVendorSamples.java index 8d202fadf16f..ab98e9d32d48 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionVendorSkusListByVendorSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorSkusListByVendorSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for NetworkFunctionVendorSkus ListByVendor. */ public final class NetworkFunctionVendorSkusListByVendorSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionSkuListByVendor.json + */ /** * Sample code: List vendors and skus. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorsListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorsListSamples.java new file mode 100644 index 000000000000..e660905ec742 --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionVendorsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.generated; + +import com.azure.core.util.Context; + +/** Samples for NetworkFunctionVendors List. */ +public final class NetworkFunctionVendorsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionVendorAndSkuListBySubscription.json + */ + /** + * Sample code: List vendors and skus by subscription. + * + * @param manager Entry point to HybridNetworkManager. + */ + public static void listVendorsAndSkusBySubscription( + com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { + manager.networkFunctionVendors().list(Context.NONE); + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsCreateOrUpdateSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsCreateOrUpdateSamples.java similarity index 95% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsCreateOrUpdateSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsCreateOrUpdateSamples.java index e226a588f57e..06ffbdebf98a 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsCreateOrUpdateSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.management.SubResource; import com.azure.core.management.serializer.SerializerFactory; @@ -18,6 +18,9 @@ /** Samples for NetworkFunctions CreateOrUpdate. */ public final class NetworkFunctionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionCreate.json + */ /** * Sample code: Create network function resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsDeleteSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsDeleteSamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsDeleteSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsDeleteSamples.java index d250439a9b37..6da30397581a 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsDeleteSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsDeleteSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for NetworkFunctions Delete. */ public final class NetworkFunctionsDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionDelete.json + */ /** * Sample code: Delete network function resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsExecuteRequestSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsExecuteRequestSamples.java new file mode 100644 index 000000000000..8e6a5bb14804 --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsExecuteRequestSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridnetwork.models.ExecuteRequestParameters; +import com.azure.resourcemanager.hybridnetwork.models.HttpMethod; +import com.azure.resourcemanager.hybridnetwork.models.RequestMetadata; + +/** Samples for NetworkFunctions ExecuteRequest. */ +public final class NetworkFunctionsExecuteRequestSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionsExecuteRequest.json + */ + /** + * Sample code: Send request to network function services. + * + * @param manager Entry point to HybridNetworkManager. + */ + public static void sendRequestToNetworkFunctionServices( + com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { + manager + .networkFunctions() + .executeRequest( + "rg", + "testNetworkfunction", + new ExecuteRequestParameters() + .withServiceEndpoint("serviceEndpoint") + .withRequestMetadata( + new RequestMetadata() + .withRelativePath("/simProfiles/testSimProfile") + .withHttpMethod(HttpMethod.POST) + .withSerializedBody( + "{\"subscriptionProfile\":\"ChantestSubscription15\",\"permanentKey\":\"00112233445566778899AABBCCDDEEFF\",\"opcOperatorCode\":\"63bfa50ee6523365ff14c1f45f88737d\",\"staticIpAddresses\":{\"internet\":{\"ipv4Addr\":\"198.51.100.1\",\"ipv6Prefix\":\"2001:db8:abcd:12::0/64\"},\"another_network\":{\"ipv6Prefix\":\"2001:111:cdef:22::0/64\"}}}") + .withApiVersion("apiVersionQueryString")), + Context.NONE); + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsGetByResourceGroupSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsGetByResourceGroupSamples.java similarity index 74% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsGetByResourceGroupSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsGetByResourceGroupSamples.java index 3dbf44391279..91fe8664819b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsGetByResourceGroupSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsGetByResourceGroupSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for NetworkFunctions GetByResourceGroup. */ public final class NetworkFunctionsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionGet.json + */ /** * Sample code: Get network function resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsListByResourceGroupSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsListByResourceGroupSamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsListByResourceGroupSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsListByResourceGroupSamples.java index 5a1c1ad732e4..b7ba4f4e59be 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsListByResourceGroupSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsListByResourceGroupSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for NetworkFunctions ListByResourceGroup. */ public final class NetworkFunctionsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionListByResourceGroup.json + */ /** * Sample code: List network function in resource group. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsListSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsListSamples.java index 698341ff93ba..8d8de0e1211e 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for NetworkFunctions List. */ public final class NetworkFunctionsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionListBySubscription.json + */ /** * Sample code: List all network function resources in subscription. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsUpdateTagsSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsUpdateTagsSamples.java similarity index 84% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsUpdateTagsSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsUpdateTagsSamples.java index 49dead3888e5..b9118a99b40f 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/NetworkFunctionsUpdateTagsSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/NetworkFunctionsUpdateTagsSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunction; @@ -11,6 +11,9 @@ /** Samples for NetworkFunctions UpdateTags. */ public final class NetworkFunctionsUpdateTagsSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/NetworkFunctionUpdateTags.json + */ /** * Sample code: Update tags for network function resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/OperationsListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/OperationsListSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/OperationsListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/OperationsListSamples.java index 4d75e60531d2..d624b7de17f4 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/OperationsListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/OperationsListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/GetOperations.json + */ /** * Sample code: Get Registration Operations. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesGetSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesGetSamples.java similarity index 76% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesGetSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesGetSamples.java index 76190984b805..ee7f7fc520a7 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesGetSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesGetSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for RoleInstances Get. */ public final class RoleInstancesGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceGet.json + */ /** * Sample code: Get the operational state of role instance of vendor network function. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesListSamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesListSamples.java index a27833132276..0d02172582a3 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for RoleInstances List. */ public final class RoleInstancesListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceListByVendorNetworkFunction.json + */ /** * Sample code: List all role instances of vendor network function. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesRestartSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesRestartSamples.java similarity index 75% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesRestartSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesRestartSamples.java index 7fc6cf4c6116..bb3911620af7 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesRestartSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesRestartSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for RoleInstances Restart. */ public final class RoleInstancesRestartSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceRestart.json + */ /** * Sample code: Restart a role instance of a vendor network function. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesStartSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesStartSamples.java similarity index 75% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesStartSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesStartSamples.java index 5d42ab5e531f..ac5c277c668c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesStartSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesStartSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for RoleInstances Start. */ public final class RoleInstancesStartSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceStart.json + */ /** * Sample code: Start a role instance of a vendor network function. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesStopSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesStopSamples.java similarity index 75% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesStopSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesStopSamples.java index 3ff6e3e24d59..44cbef09046b 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/RoleInstancesStopSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/RoleInstancesStopSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for RoleInstances Stop. */ public final class RoleInstancesStopSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/RoleInstanceStop.json + */ /** * Sample code: Stop a role instance of a vendor network function. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsCreateOrUpdateSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsCreateOrUpdateSamples.java similarity index 96% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsCreateOrUpdateSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsCreateOrUpdateSamples.java index 594edd6640b9..eec8ae05e832 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsCreateOrUpdateSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.resourcemanager.hybridnetwork.models.IpAllocationMethod; import com.azure.resourcemanager.hybridnetwork.models.IpVersion; @@ -19,6 +19,9 @@ /** Samples for VendorNetworkFunctions CreateOrUpdate. */ public final class VendorNetworkFunctionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorNfCreate.json + */ /** * Sample code: Create or update vendor network function sub resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsGetSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsGetSamples.java similarity index 77% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsGetSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsGetSamples.java index a715dc95471a..9dd56e9a9e2f 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsGetSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsGetSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorNetworkFunctions Get. */ public final class VendorNetworkFunctionsGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorNfGet.json + */ /** * Sample code: Get vendor network function sub resource by service key of network function. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsListSamples.java similarity index 74% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsListSamples.java index 7eea3ad6c45a..474a0075f184 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorNetworkFunctionsListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorNetworkFunctionsListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorNetworkFunctions List. */ public final class VendorNetworkFunctionsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorNfListByVendor.json + */ /** * Sample code: List all nfs of vendor resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewCreateOrUpdateSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewCreateOrUpdateSamples.java similarity index 75% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewCreateOrUpdateSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewCreateOrUpdateSamples.java index 09f444f82d7f..439fcbcc67d0 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewCreateOrUpdateSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewCreateOrUpdateSamples.java @@ -2,10 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; /** Samples for VendorSkuPreview CreateOrUpdate. */ public final class VendorSkuPreviewCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewCreate.json + */ /** * Sample code: Create or update preview subscription of vendor sku sub resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewDeleteSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewDeleteSamples.java similarity index 75% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewDeleteSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewDeleteSamples.java index b358c1db4e16..76e8094c9de1 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewDeleteSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewDeleteSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorSkuPreview Delete. */ public final class VendorSkuPreviewDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewDelete.json + */ /** * Sample code: Delete preview subscription of vendor sku sub resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewGetSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewGetSamples.java similarity index 75% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewGetSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewGetSamples.java index a3c45f984d46..e594735b90ac 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewGetSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewGetSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorSkuPreview Get. */ public final class VendorSkuPreviewGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewGet.json + */ /** * Sample code: Get preview subscription of vendor sku sub resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewListSamples.java similarity index 74% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewListSamples.java index 94a3f282af43..7e91c105e591 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkuPreviewListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorSkuPreview List. */ public final class VendorSkuPreviewListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuPreviewListBySku.json + */ /** * Sample code: List all preview subscriptions of vendor sku sub resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusCreateOrUpdateSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusCreateOrUpdateSamples.java similarity index 96% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusCreateOrUpdateSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusCreateOrUpdateSamples.java index 8823b3fadf84..048335e032d9 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusCreateOrUpdateSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; @@ -16,6 +16,7 @@ import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionRoleConfiguration; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionRoleConfigurationType; import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionTemplate; +import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionType; import com.azure.resourcemanager.hybridnetwork.models.NetworkInterface; import com.azure.resourcemanager.hybridnetwork.models.NetworkInterfaceIpConfiguration; import com.azure.resourcemanager.hybridnetwork.models.OperatingSystemTypes; @@ -33,6 +34,9 @@ /** Samples for VendorSkus CreateOrUpdate. */ public final class VendorSkusCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuCreate.json + */ /** * Sample code: Create or update the sku of vendor resource. * @@ -45,6 +49,7 @@ public static void createOrUpdateTheSkuOfVendorResource( .define("TestSku") .withExistingVendor("TestVendor") .withDeploymentMode(SkuDeploymentMode.PRIVATE_EDGE_ZONE) + .withNetworkFunctionType(NetworkFunctionType.VIRTUAL_NETWORK_FUNCTION) .withPreview(true) .withManagedApplicationTemplate( SerializerFactory diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusDeleteSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusDeleteSamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusDeleteSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusDeleteSamples.java index d6d920d3d0a8..e8e6cdfe2e29 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusDeleteSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusDeleteSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorSkus Delete. */ public final class VendorSkusDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuDelete.json + */ /** * Sample code: Delete the sku of vendor resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusGetSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusGetSamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusGetSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusGetSamples.java index 5fc89a57a738..6594966a7966 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusGetSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusGetSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorSkus Get. */ public final class VendorSkusGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuGet.json + */ /** * Sample code: Get the sku of vendor resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusListCredentialSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusListCredentialSamples.java new file mode 100644 index 000000000000..bfa15195207c --- /dev/null +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusListCredentialSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridnetwork.generated; + +import com.azure.core.util.Context; + +/** Samples for VendorSkus ListCredential. */ +public final class VendorSkusListCredentialSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuListCredential.json + */ + /** + * Sample code: Generate a credential for vendor sku. + * + * @param manager Entry point to HybridNetworkManager. + */ + public static void generateACredentialForVendorSku( + com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { + manager.vendorSkus().listCredentialWithResponse("TestVendor", "TestSku", Context.NONE); + } +} diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusListSamples.java similarity index 73% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusListSamples.java index 2ef41577b88a..c7d736ad21f4 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkusListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorSkusListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for VendorSkus List. */ public final class VendorSkusListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorSkuListByVendor.json + */ /** * Sample code: List all the vendor skus of vendor resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsCreateOrUpdateSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsCreateOrUpdateSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsCreateOrUpdateSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsCreateOrUpdateSamples.java index 5fd1620557ad..a410797b430c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsCreateOrUpdateSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsCreateOrUpdateSamples.java @@ -2,10 +2,13 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; /** Samples for Vendors CreateOrUpdate. */ public final class VendorsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorCreate.json + */ /** * Sample code: Create or update Vendor resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsDeleteSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsDeleteSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsDeleteSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsDeleteSamples.java index 80b8815448e8..1f5780e03619 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsDeleteSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsDeleteSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Vendors Delete. */ public final class VendorsDeleteSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorDelete.json + */ /** * Sample code: Delete vendor resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsGetSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsGetSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsGetSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsGetSamples.java index 8fbe6148794c..9e70ed56016c 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsGetSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsGetSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Vendors Get. */ public final class VendorsGetSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorGet.json + */ /** * Sample code: Get Vendor resource. * diff --git a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsListSamples.java b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsListSamples.java similarity index 72% rename from sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsListSamples.java rename to sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsListSamples.java index 351866c306e5..8228f1c2cd41 100644 --- a/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorsListSamples.java +++ b/sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/generated/VendorsListSamples.java @@ -2,12 +2,15 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridnetwork; +package com.azure.resourcemanager.hybridnetwork.generated; import com.azure.core.util.Context; /** Samples for Vendors List. */ public final class VendorsListSamples { + /* + * x-ms-original-file: specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/preview/2022-01-01-preview/examples/VendorListBySubscription.json + */ /** * Sample code: List all vendor resources in subscription. *