diff --git a/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md b/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md index b1e69ba9268a..0621374175d4 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md +++ b/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2021-10-15) +- Azure Resource Manager SignalR client library for Java. This package contains Microsoft Azure SDK for SignalR Management SDK. REST API for Azure SignalR Service. Package tag package-2021-10-01. 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.2 (2021-07-09) diff --git a/sdk/signalr/azure-resourcemanager-signalr/README.md b/sdk/signalr/azure-resourcemanager-signalr/README.md index 65a08d10f78b..d2438293701e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/README.md +++ b/sdk/signalr/azure-resourcemanager-signalr/README.md @@ -2,7 +2,7 @@ Azure Resource Manager SignalR client library for Java. -This package contains Microsoft Azure SDK for SignalR Management SDK. REST API for Azure SignalR Service. Package tag package-2021-06-01-preview. 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 SignalR Management SDK. REST API for Azure SignalR Service. Package tag package-2021-10-01. 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-signalr - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md b/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md index 068970ccd21f..3b96cfc1efd1 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md +++ b/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md @@ -1,41 +1,747 @@ # Code snippets and samples -### Operations +## Operations -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/OperationsListSamples.java) +- [List](#operations_list) -### SignalR +## SignalR -- [CheckNameAvailability](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCheckNameAvailabilitySamples.java) -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRDeleteSamples.java) -- [GetByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRGetByResourceGroupSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListSamples.java) -- [ListByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListByResourceGroupSamples.java) -- [ListKeys](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListKeysSamples.java) -- [RegenerateKey](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRegenerateKeySamples.java) -- [Restart](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRestartSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRUpdateSamples.java) +- [CheckNameAvailability](#signalr_checknameavailability) +- [CreateOrUpdate](#signalr_createorupdate) +- [Delete](#signalr_delete) +- [GetByResourceGroup](#signalr_getbyresourcegroup) +- [List](#signalr_list) +- [ListByResourceGroup](#signalr_listbyresourcegroup) +- [ListKeys](#signalr_listkeys) +- [ListSkus](#signalr_listskus) +- [RegenerateKey](#signalr_regeneratekey) +- [Restart](#signalr_restart) +- [Update](#signalr_update) -### SignalRPrivateEndpointConnections +## SignalRPrivateEndpointConnections -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsUpdateSamples.java) +- [Delete](#signalrprivateendpointconnections_delete) +- [Get](#signalrprivateendpointconnections_get) +- [List](#signalrprivateendpointconnections_list) +- [Update](#signalrprivateendpointconnections_update) -### SignalRPrivateLinkResources +## SignalRPrivateLinkResources -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateLinkResourcesListSamples.java) +- [List](#signalrprivatelinkresources_list) -### SignalRSharedPrivateLinkResources +## SignalRSharedPrivateLinkResources -- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesListSamples.java) +- [CreateOrUpdate](#signalrsharedprivatelinkresources_createorupdate) +- [Delete](#signalrsharedprivatelinkresources_delete) +- [Get](#signalrsharedprivatelinkresources_get) +- [List](#signalrsharedprivatelinkresources_list) -### Usages +## Usages + +- [List](#usages_list) +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void operationsList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### SignalR_CheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; + +/** Samples for SignalR CheckNameAvailability. */ +public final class SignalRCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CheckNameAvailability.json + */ + /** + * Sample code: SignalR_CheckNameAvailability. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRCheckNameAvailability(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRs() + .checkNameAvailabilityWithResponse( + "eastus", + new NameAvailabilityParameters() + .withType("Microsoft.SignalRService/SignalR") + .withName("mySignalRService"), + Context.NONE); + } +} +``` + +### SignalR_CreateOrUpdate + +```java +import com.azure.resourcemanager.signalr.models.AclAction; +import com.azure.resourcemanager.signalr.models.FeatureFlags; +import com.azure.resourcemanager.signalr.models.ManagedIdentity; +import com.azure.resourcemanager.signalr.models.ManagedIdentitySettings; +import com.azure.resourcemanager.signalr.models.ManagedIdentityType; +import com.azure.resourcemanager.signalr.models.NetworkAcl; +import com.azure.resourcemanager.signalr.models.PrivateEndpointAcl; +import com.azure.resourcemanager.signalr.models.ResourceSku; +import com.azure.resourcemanager.signalr.models.ServerlessUpstreamSettings; +import com.azure.resourcemanager.signalr.models.ServiceKind; +import com.azure.resourcemanager.signalr.models.SignalRCorsSettings; +import com.azure.resourcemanager.signalr.models.SignalRFeature; +import com.azure.resourcemanager.signalr.models.SignalRNetworkACLs; +import com.azure.resourcemanager.signalr.models.SignalRRequestType; +import com.azure.resourcemanager.signalr.models.SignalRSkuTier; +import com.azure.resourcemanager.signalr.models.SignalRTlsSettings; +import com.azure.resourcemanager.signalr.models.UpstreamAuthSettings; +import com.azure.resourcemanager.signalr.models.UpstreamAuthType; +import com.azure.resourcemanager.signalr.models.UpstreamTemplate; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SignalR CreateOrUpdate. */ +public final class SignalRCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CreateOrUpdate.json + */ + /** + * Sample code: SignalR_CreateOrUpdate. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRCreateOrUpdate(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRs() + .define("mySignalRService") + .withRegion("eastus") + .withExistingResourceGroup("myResourceGroup") + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Standard_S1").withTier(SignalRSkuTier.STANDARD).withCapacity(1)) + .withKind(ServiceKind.SIGNALR) + .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) + .withTls(new SignalRTlsSettings().withClientCertEnabled(false)) + .withFeatures( + Arrays + .asList( + new SignalRFeature() + .withFlag(FeatureFlags.SERVICE_MODE) + .withValue("Serverless") + .withProperties(mapOf()), + new SignalRFeature() + .withFlag(FeatureFlags.ENABLE_CONNECTIVITY_LOGS) + .withValue("True") + .withProperties(mapOf()), + new SignalRFeature() + .withFlag(FeatureFlags.ENABLE_MESSAGING_LOGS) + .withValue("False") + .withProperties(mapOf()), + new SignalRFeature() + .withFlag(FeatureFlags.ENABLE_LIVE_TRACE) + .withValue("False") + .withProperties(mapOf()))) + .withCors(new SignalRCorsSettings().withAllowedOrigins(Arrays.asList("https://foo.com", "https://bar.com"))) + .withUpstream( + new ServerlessUpstreamSettings() + .withTemplates( + Arrays + .asList( + new UpstreamTemplate() + .withHubPattern("*") + .withEventPattern("connect,disconnect") + .withCategoryPattern("*") + .withUrlTemplate("https://example.com/chat/api/connect") + .withAuth( + new UpstreamAuthSettings() + .withType(UpstreamAuthType.MANAGED_IDENTITY) + .withManagedIdentity( + new ManagedIdentitySettings().withResource("api://example")))))) + .withNetworkACLs( + new SignalRNetworkACLs() + .withDefaultAction(AclAction.DENY) + .withPublicNetwork(new NetworkAcl().withAllow(Arrays.asList(SignalRRequestType.CLIENT_CONNECTION))) + .withPrivateEndpoints( + Arrays + .asList( + new PrivateEndpointAcl() + .withAllow(Arrays.asList(SignalRRequestType.SERVER_CONNECTION)) + .withName("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) + .withPublicNetworkAccess("Enabled") + .withDisableLocalAuth(false) + .withDisableAadAuth(false) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### SignalR_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for SignalR Delete. */ +public final class SignalRDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Delete.json + */ + /** + * Sample code: SignalR_Delete. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRDelete(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().delete("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalR_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for SignalR GetByResourceGroup. */ +public final class SignalRGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Get.json + */ + /** + * Sample code: SignalR_Get. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalR_List + +```java +import com.azure.core.util.Context; + +/** Samples for SignalR List. */ +public final class SignalRListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListBySubscription.json + */ + /** + * Sample code: SignalR_ListBySubscription. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRListBySubscription(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().list(Context.NONE); + } +} +``` + +### SignalR_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for SignalR ListByResourceGroup. */ +public final class SignalRListByResourceGroupSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListByResourceGroup.json + */ + /** + * Sample code: SignalR_ListByResourceGroup. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRListByResourceGroup(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().listByResourceGroup("myResourceGroup", Context.NONE); + } +} +``` + +### SignalR_ListKeys + +```java +import com.azure.core.util.Context; + +/** Samples for SignalR ListKeys. */ +public final class SignalRListKeysSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListKeys.json + */ + /** + * Sample code: SignalR_ListKeys. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRListKeys(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().listKeysWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalR_ListSkus + +```java +import com.azure.core.util.Context; + +/** Samples for SignalR ListSkus. */ +public final class SignalRListSkusSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListSkus.json + */ + /** + * Sample code: SignalR_ListSkus. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRListSkus(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().listSkusWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalR_RegenerateKey + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.signalr.models.KeyType; +import com.azure.resourcemanager.signalr.models.RegenerateKeyParameters; + +/** Samples for SignalR RegenerateKey. */ +public final class SignalRRegenerateKeySamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_RegenerateKey.json + */ + /** + * Sample code: SignalR_RegenerateKey. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRRegenerateKey(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRs() + .regenerateKey( + "myResourceGroup", + "mySignalRService", + new RegenerateKeyParameters().withKeyType(KeyType.PRIMARY), + Context.NONE); + } +} +``` + +### SignalR_Restart + +```java +import com.azure.core.util.Context; + +/** Samples for SignalR Restart. */ +public final class SignalRRestartSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Restart.json + */ + /** + * Sample code: SignalR_Restart. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRRestart(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().restart("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalR_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.signalr.models.AclAction; +import com.azure.resourcemanager.signalr.models.FeatureFlags; +import com.azure.resourcemanager.signalr.models.ManagedIdentity; +import com.azure.resourcemanager.signalr.models.ManagedIdentitySettings; +import com.azure.resourcemanager.signalr.models.ManagedIdentityType; +import com.azure.resourcemanager.signalr.models.NetworkAcl; +import com.azure.resourcemanager.signalr.models.PrivateEndpointAcl; +import com.azure.resourcemanager.signalr.models.ResourceSku; +import com.azure.resourcemanager.signalr.models.ServerlessUpstreamSettings; +import com.azure.resourcemanager.signalr.models.SignalRCorsSettings; +import com.azure.resourcemanager.signalr.models.SignalRFeature; +import com.azure.resourcemanager.signalr.models.SignalRNetworkACLs; +import com.azure.resourcemanager.signalr.models.SignalRRequestType; +import com.azure.resourcemanager.signalr.models.SignalRResource; +import com.azure.resourcemanager.signalr.models.SignalRSkuTier; +import com.azure.resourcemanager.signalr.models.SignalRTlsSettings; +import com.azure.resourcemanager.signalr.models.UpstreamAuthSettings; +import com.azure.resourcemanager.signalr.models.UpstreamAuthType; +import com.azure.resourcemanager.signalr.models.UpstreamTemplate; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SignalR Update. */ +public final class SignalRUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Update.json + */ + /** + * Sample code: SignalR_Update. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRUpdate(com.azure.resourcemanager.signalr.SignalRManager manager) { + SignalRResource resource = + manager + .signalRs() + .getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Standard_S1").withTier(SignalRSkuTier.STANDARD).withCapacity(1)) + .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) + .withTls(new SignalRTlsSettings().withClientCertEnabled(false)) + .withFeatures( + Arrays + .asList( + new SignalRFeature() + .withFlag(FeatureFlags.SERVICE_MODE) + .withValue("Serverless") + .withProperties(mapOf()), + new SignalRFeature() + .withFlag(FeatureFlags.ENABLE_CONNECTIVITY_LOGS) + .withValue("True") + .withProperties(mapOf()), + new SignalRFeature() + .withFlag(FeatureFlags.ENABLE_MESSAGING_LOGS) + .withValue("False") + .withProperties(mapOf()), + new SignalRFeature() + .withFlag(FeatureFlags.ENABLE_LIVE_TRACE) + .withValue("False") + .withProperties(mapOf()))) + .withCors(new SignalRCorsSettings().withAllowedOrigins(Arrays.asList("https://foo.com", "https://bar.com"))) + .withUpstream( + new ServerlessUpstreamSettings() + .withTemplates( + Arrays + .asList( + new UpstreamTemplate() + .withHubPattern("*") + .withEventPattern("connect,disconnect") + .withCategoryPattern("*") + .withUrlTemplate("https://example.com/chat/api/connect") + .withAuth( + new UpstreamAuthSettings() + .withType(UpstreamAuthType.MANAGED_IDENTITY) + .withManagedIdentity( + new ManagedIdentitySettings().withResource("api://example")))))) + .withNetworkACLs( + new SignalRNetworkACLs() + .withDefaultAction(AclAction.DENY) + .withPublicNetwork(new NetworkAcl().withAllow(Arrays.asList(SignalRRequestType.CLIENT_CONNECTION))) + .withPrivateEndpoints( + Arrays + .asList( + new PrivateEndpointAcl() + .withAllow(Arrays.asList(SignalRRequestType.SERVER_CONNECTION)) + .withName("mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e")))) + .withPublicNetworkAccess("Enabled") + .withDisableLocalAuth(false) + .withDisableAadAuth(false) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### SignalRPrivateEndpointConnections_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for SignalRPrivateEndpointConnections Delete. */ +public final class SignalRPrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Delete.json + */ + /** + * Sample code: SignalRPrivateEndpointConnections_Delete. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRPrivateEndpointConnectionsDelete( + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRPrivateEndpointConnections() + .delete( + "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", + "myResourceGroup", + "mySignalRService", + Context.NONE); + } +} +``` + +### SignalRPrivateEndpointConnections_Get + +```java +import com.azure.core.util.Context; + +/** Samples for SignalRPrivateEndpointConnections Get. */ +public final class SignalRPrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Get.json + */ + /** + * Sample code: SignalRPrivateEndpointConnections_Get. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRPrivateEndpointConnectionsGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRPrivateEndpointConnections() + .getWithResponse( + "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", + "myResourceGroup", + "mySignalRService", + Context.NONE); + } +} +``` + +### SignalRPrivateEndpointConnections_List + +```java +import com.azure.core.util.Context; + +/** Samples for SignalRPrivateEndpointConnections List. */ +public final class SignalRPrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_List.json + */ + /** + * Sample code: SignalRPrivateEndpointConnections_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRPrivateEndpointConnectionsList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRPrivateEndpointConnections().list("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalRPrivateEndpointConnections_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.signalr.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.signalr.models.PrivateEndpoint; +import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionStatus; + +/** Samples for SignalRPrivateEndpointConnections Update. */ +public final class SignalRPrivateEndpointConnectionsUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Update.json + */ + /** + * Sample code: SignalRPrivateEndpointConnections_Update. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRPrivateEndpointConnectionsUpdate( + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRPrivateEndpointConnections() + .updateWithResponse( + "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", + "myResourceGroup", + "mySignalRService", + new PrivateEndpointConnectionInner() + .withPrivateEndpoint( + new PrivateEndpoint() + .withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) + .withActionsRequired("None")), + Context.NONE); + } +} +``` + +### SignalRPrivateLinkResources_List + +```java +import com.azure.core.util.Context; + +/** Samples for SignalRPrivateLinkResources List. */ +public final class SignalRPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateLinkResources_List.json + */ + /** + * Sample code: SignalRPrivateLinkResources_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRPrivateLinkResourcesList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalRSharedPrivateLinkResources_CreateOrUpdate + +```java +/** Samples for SignalRSharedPrivateLinkResources CreateOrUpdate. */ +public final class SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json + */ + /** + * Sample code: SignalRSharedPrivateLinkResources_CreateOrUpdate. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRSharedPrivateLinkResourcesCreateOrUpdate( + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRSharedPrivateLinkResources() + .define("upstream") + .withExistingSignalR("myResourceGroup", "mySignalRService") + .withGroupId("sites") + .withPrivateLinkResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp") + .withRequestMessage("Please approve") + .create(); + } +} +``` + +### SignalRSharedPrivateLinkResources_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for SignalRSharedPrivateLinkResources Delete. */ +public final class SignalRSharedPrivateLinkResourcesDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Delete.json + */ + /** + * Sample code: SignalRSharedPrivateLinkResources_Delete. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRSharedPrivateLinkResourcesDelete( + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRSharedPrivateLinkResources() + .delete("upstream", "myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalRSharedPrivateLinkResources_Get + +```java +import com.azure.core.util.Context; + +/** Samples for SignalRSharedPrivateLinkResources Get. */ +public final class SignalRSharedPrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Get.json + */ + /** + * Sample code: SignalRSharedPrivateLinkResources_Get. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRSharedPrivateLinkResourcesGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRSharedPrivateLinkResources() + .getWithResponse("upstream", "myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### SignalRSharedPrivateLinkResources_List + +```java +import com.azure.core.util.Context; + +/** Samples for SignalRSharedPrivateLinkResources List. */ +public final class SignalRSharedPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_List.json + */ + /** + * Sample code: SignalRSharedPrivateLinkResources_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRSharedPrivateLinkResourcesList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRSharedPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); + } +} +``` + +### Usages_List + +```java +import com.azure.core.util.Context; + +/** Samples for Usages List. */ +public final class UsagesListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json + */ + /** + * Sample code: Usages_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void usagesList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.usages().list("eastus", Context.NONE); + } +} +``` -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/UsagesListSamples.java) diff --git a/sdk/signalr/azure-resourcemanager-signalr/pom.xml b/sdk/signalr/azure-resourcemanager-signalr/pom.xml index 132172d9a8c7..a814e772bcbb 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/pom.xml +++ b/sdk/signalr/azure-resourcemanager-signalr/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for SignalR Management - This package contains Microsoft Azure SDK for SignalR Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure SignalR Service. Package tag package-2021-06-01-preview. + This package contains Microsoft Azure SDK for SignalR Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure SignalR Service. Package tag package-2021-10-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/SignalRManager.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/SignalRManager.java index 6d7fe80f10c3..2270bfb9537b 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/SignalRManager.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/SignalRManager.java @@ -190,7 +190,7 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.signalr") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateEndpointConnectionsClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateEndpointConnectionsClient.java index 343c104aa406..6e41b9466be9 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateEndpointConnectionsClient.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateEndpointConnectionsClient.java @@ -133,7 +133,7 @@ Response updateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String privateEndpointConnectionName, String resourceGroupName, String resourceName); @@ -150,7 +150,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRSharedPrivateLinkResourcesClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRSharedPrivateLinkResourcesClient.java index a128118a36a9..1ba24dbe00c1 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRSharedPrivateLinkResourcesClient.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRSharedPrivateLinkResourcesClient.java @@ -92,7 +92,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a Shared Private Link Resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( String sharedPrivateLinkResourceName, String resourceGroupName, @@ -113,7 +113,7 @@ SyncPoller, SharedPrivateLinkResource * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a Shared Private Link Resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( String sharedPrivateLinkResourceName, String resourceGroupName, @@ -175,7 +175,7 @@ SharedPrivateLinkResourceInner createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); @@ -192,7 +192,7 @@ SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRsClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRsClient.java index 2a45a238269d..f268fec36e7e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRsClient.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRsClient.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner; import com.azure.resourcemanager.signalr.fluent.models.SignalRKeysInner; import com.azure.resourcemanager.signalr.fluent.models.SignalRResourceInner; +import com.azure.resourcemanager.signalr.fluent.models.SkuListInner; import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; import com.azure.resourcemanager.signalr.models.RegenerateKeyParameters; @@ -138,7 +139,7 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignalRResourceInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters); @@ -155,7 +156,7 @@ SyncPoller, SignalRResourceInner> beginCreateOr * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignalRResourceInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters, Context context); @@ -202,7 +203,7 @@ SignalRResourceInner createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); /** @@ -217,7 +218,7 @@ SignalRResourceInner createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context); /** @@ -259,7 +260,7 @@ SignalRResourceInner createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignalRResourceInner> beginUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters); @@ -276,7 +277,7 @@ SyncPoller, SignalRResourceInner> beginUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignalRResourceInner> beginUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters, Context context); @@ -353,7 +354,7 @@ SignalRResourceInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represents the access keys of the resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignalRKeysInner> beginRegenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters); @@ -370,7 +371,7 @@ SyncPoller, SignalRKeysInner> beginRegenerateKey( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represents the access keys of the resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SignalRKeysInner> beginRegenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context); @@ -417,7 +418,7 @@ SignalRKeysInner regenerateKey( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName); /** @@ -432,7 +433,7 @@ SignalRKeysInner regenerateKey( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName, Context context); /** @@ -461,4 +462,33 @@ SignalRKeysInner regenerateKey( */ @ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String resourceName, Context context); + + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @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 list skus operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SkuListInner listSkus(String resourceGroupName, String resourceName); + + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @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 list skus operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context); } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateEndpointConnectionInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateEndpointConnectionInner.java index e1d45ecaa0c7..0e4fe613b454 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateEndpointConnectionInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.signalr.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -14,11 +13,11 @@ import com.azure.resourcemanager.signalr.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** A private endpoint connection to an azure resource. */ -@JsonFlatten @Fluent -public class PrivateEndpointConnectionInner extends ProxyResource { +public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* @@ -28,22 +27,10 @@ public class PrivateEndpointConnectionInner extends ProxyResource { private SystemData systemData; /* - * Provisioning state of the private endpoint connection + * Properties of the private endpoint connection */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * Private endpoint associated with the private endpoint connection - */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * Connection state - */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. @@ -54,13 +41,22 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the innerProperties property: Properties of the private endpoint connection. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + /** * Get the provisioningState property: Provisioning state of the private endpoint connection. * * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -69,7 +65,7 @@ public ProvisioningState provisioningState() { * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); } /** @@ -79,17 +75,29 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionInner object itself. */ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); return this; } + /** + * Get the groupIds property: Group IDs. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.innerProperties() == null ? null : this.innerProperties().groupIds(); + } + /** * Get the privateLinkServiceConnectionState property: Connection state. * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); } /** @@ -100,7 +108,10 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } @@ -110,11 +121,8 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..e6909603fb5d --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.signalr.models.PrivateEndpoint; +import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.signalr.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Private endpoint connection properties. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); + + /* + * Provisioning state of the private endpoint connection + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Private endpoint associated with the private endpoint connection + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * Group IDs + */ + @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY) + private List groupIds; + + /* + * Connection state + */ + @JsonProperty(value = "privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * Get the provisioningState property: Provisioning state of the private endpoint connection. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpoint property: Private endpoint associated with the private endpoint connection. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: Private endpoint associated with the private endpoint connection. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the groupIds property: Group IDs. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Get the privateLinkServiceConnectionState property: Connection state. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: Connection state. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceInner.java index 5ddb8ae19796..e1e61c43f7a4 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.signalr.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType; @@ -14,34 +13,24 @@ import java.util.List; /** Private link resource. */ -@JsonFlatten @Fluent -public class PrivateLinkResourceInner extends ProxyResource { +public final class PrivateLinkResourceInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); /* - * Group Id of the private link resource + * Properties of a private link resource */ - @JsonProperty(value = "properties.groupId") - private String groupId; + @JsonProperty(value = "properties") + private PrivateLinkResourceProperties innerProperties; - /* - * Required members of the private link resource - */ - @JsonProperty(value = "properties.requiredMembers") - private List requiredMembers; - - /* - * Required private DNS zone names - */ - @JsonProperty(value = "properties.requiredZoneNames") - private List requiredZoneNames; - - /* - * The list of resources that are onboarded to private link service + /** + * Get the innerProperties property: Properties of a private link resource. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.shareablePrivateLinkResourceTypes") - private List shareablePrivateLinkResourceTypes; + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } /** * Get the groupId property: Group Id of the private link resource. @@ -49,7 +38,7 @@ public class PrivateLinkResourceInner extends ProxyResource { * @return the groupId value. */ public String groupId() { - return this.groupId; + return this.innerProperties() == null ? null : this.innerProperties().groupId(); } /** @@ -59,7 +48,10 @@ public String groupId() { * @return the PrivateLinkResourceInner object itself. */ public PrivateLinkResourceInner withGroupId(String groupId) { - this.groupId = groupId; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withGroupId(groupId); return this; } @@ -69,7 +61,7 @@ public PrivateLinkResourceInner withGroupId(String groupId) { * @return the requiredMembers value. */ public List requiredMembers() { - return this.requiredMembers; + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); } /** @@ -79,7 +71,10 @@ public List requiredMembers() { * @return the PrivateLinkResourceInner object itself. */ public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { - this.requiredMembers = requiredMembers; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredMembers(requiredMembers); return this; } @@ -89,7 +84,7 @@ public PrivateLinkResourceInner withRequiredMembers(List requiredMembers * @return the requiredZoneNames value. */ public List requiredZoneNames() { - return this.requiredZoneNames; + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } /** @@ -99,7 +94,10 @@ public List requiredZoneNames() { * @return the PrivateLinkResourceInner object itself. */ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); return this; } @@ -110,7 +108,7 @@ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneN * @return the shareablePrivateLinkResourceTypes value. */ public List shareablePrivateLinkResourceTypes() { - return this.shareablePrivateLinkResourceTypes; + return this.innerProperties() == null ? null : this.innerProperties().shareablePrivateLinkResourceTypes(); } /** @@ -122,7 +120,10 @@ public List shareablePrivateLinkResourceTypes( */ public PrivateLinkResourceInner withShareablePrivateLinkResourceTypes( List shareablePrivateLinkResourceTypes) { - this.shareablePrivateLinkResourceTypes = shareablePrivateLinkResourceTypes; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withShareablePrivateLinkResourceTypes(shareablePrivateLinkResourceTypes); return this; } @@ -132,8 +133,8 @@ public PrivateLinkResourceInner withShareablePrivateLinkResourceTypes( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (shareablePrivateLinkResourceTypes() != null) { - shareablePrivateLinkResourceTypes().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceProperties.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..99aee6934ab4 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Private link resource properties. */ +@Fluent +public final class PrivateLinkResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); + + /* + * Group Id of the private link resource + */ + @JsonProperty(value = "groupId") + private String groupId; + + /* + * Required members of the private link resource + */ + @JsonProperty(value = "requiredMembers") + private List requiredMembers; + + /* + * Required private DNS zone names + */ + @JsonProperty(value = "requiredZoneNames") + private List requiredZoneNames; + + /* + * The list of resources that are onboarded to private link service + */ + @JsonProperty(value = "shareablePrivateLinkResourceTypes") + private List shareablePrivateLinkResourceTypes; + + /** + * Get the groupId property: Group Id of the private link resource. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the groupId property: Group Id of the private link resource. + * + * @param groupId the groupId value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the requiredMembers property: Required members of the private link resource. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Set the requiredMembers property: Required members of the private link resource. + * + * @param requiredMembers the requiredMembers value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + + /** + * Get the requiredZoneNames property: Required private DNS zone names. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the requiredZoneNames property: Required private DNS zone names. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + + /** + * Get the shareablePrivateLinkResourceTypes property: The list of resources that are onboarded to private link + * service. + * + * @return the shareablePrivateLinkResourceTypes value. + */ + public List shareablePrivateLinkResourceTypes() { + return this.shareablePrivateLinkResourceTypes; + } + + /** + * Set the shareablePrivateLinkResourceTypes property: The list of resources that are onboarded to private link + * service. + * + * @param shareablePrivateLinkResourceTypes the shareablePrivateLinkResourceTypes value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withShareablePrivateLinkResourceTypes( + List shareablePrivateLinkResourceTypes) { + this.shareablePrivateLinkResourceTypes = shareablePrivateLinkResourceTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (shareablePrivateLinkResourceTypes() != null) { + shareablePrivateLinkResourceTypes().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceInner.java index 54aa49396ec1..a9aacb971056 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceInner.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.signalr.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; @@ -15,9 +14,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Describes a Shared Private Link Resource. */ -@JsonFlatten @Fluent -public class SharedPrivateLinkResourceInner extends ProxyResource { +public final class SharedPrivateLinkResourceInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResourceInner.class); /* @@ -27,36 +25,10 @@ public class SharedPrivateLinkResourceInner extends ProxyResource { private SystemData systemData; /* - * The group id from the provider of resource the shared private link - * resource is for + * Describes the properties of a Shared Private Link Resource */ - @JsonProperty(value = "properties.groupId") - private String groupId; - - /* - * The resource id of the resource the shared private link resource is for - */ - @JsonProperty(value = "properties.privateLinkResourceId") - private String privateLinkResourceId; - - /* - * Provisioning state of the shared private link resource - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The request message for requesting approval of the shared private link - * resource - */ - @JsonProperty(value = "properties.requestMessage") - private String requestMessage; - - /* - * Status of the shared private link resource - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private SharedPrivateLinkResourceStatus status; + @JsonProperty(value = "properties") + private SharedPrivateLinkResourceProperties innerProperties; /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. @@ -67,13 +39,22 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the innerProperties property: Describes the properties of a Shared Private Link Resource. + * + * @return the innerProperties value. + */ + private SharedPrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + /** * Get the groupId property: The group id from the provider of resource the shared private link resource is for. * * @return the groupId value. */ public String groupId() { - return this.groupId; + return this.innerProperties() == null ? null : this.innerProperties().groupId(); } /** @@ -83,7 +64,10 @@ public String groupId() { * @return the SharedPrivateLinkResourceInner object itself. */ public SharedPrivateLinkResourceInner withGroupId(String groupId) { - this.groupId = groupId; + if (this.innerProperties() == null) { + this.innerProperties = new SharedPrivateLinkResourceProperties(); + } + this.innerProperties().withGroupId(groupId); return this; } @@ -93,7 +77,7 @@ public SharedPrivateLinkResourceInner withGroupId(String groupId) { * @return the privateLinkResourceId value. */ public String privateLinkResourceId() { - return this.privateLinkResourceId; + return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId(); } /** @@ -103,7 +87,10 @@ public String privateLinkResourceId() { * @return the SharedPrivateLinkResourceInner object itself. */ public SharedPrivateLinkResourceInner withPrivateLinkResourceId(String privateLinkResourceId) { - this.privateLinkResourceId = privateLinkResourceId; + if (this.innerProperties() == null) { + this.innerProperties = new SharedPrivateLinkResourceProperties(); + } + this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId); return this; } @@ -113,7 +100,7 @@ public SharedPrivateLinkResourceInner withPrivateLinkResourceId(String privateLi * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -122,7 +109,7 @@ public ProvisioningState provisioningState() { * @return the requestMessage value. */ public String requestMessage() { - return this.requestMessage; + return this.innerProperties() == null ? null : this.innerProperties().requestMessage(); } /** @@ -132,7 +119,10 @@ public String requestMessage() { * @return the SharedPrivateLinkResourceInner object itself. */ public SharedPrivateLinkResourceInner withRequestMessage(String requestMessage) { - this.requestMessage = requestMessage; + if (this.innerProperties() == null) { + this.innerProperties = new SharedPrivateLinkResourceProperties(); + } + this.innerProperties().withRequestMessage(requestMessage); return this; } @@ -142,7 +132,7 @@ public SharedPrivateLinkResourceInner withRequestMessage(String requestMessage) * @return the status value. */ public SharedPrivateLinkResourceStatus status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** @@ -151,5 +141,8 @@ public SharedPrivateLinkResourceStatus status() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceProperties.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceProperties.java new file mode 100644 index 000000000000..b4f70972dae8 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceProperties.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.signalr.models.ProvisioningState; +import com.azure.resourcemanager.signalr.models.SharedPrivateLinkResourceStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the properties of an existing Shared Private Link Resource. */ +@Fluent +public final class SharedPrivateLinkResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResourceProperties.class); + + /* + * The group id from the provider of resource the shared private link + * resource is for + */ + @JsonProperty(value = "groupId", required = true) + private String groupId; + + /* + * The resource id of the resource the shared private link resource is for + */ + @JsonProperty(value = "privateLinkResourceId", required = true) + private String privateLinkResourceId; + + /* + * Provisioning state of the shared private link resource + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The request message for requesting approval of the shared private link + * resource + */ + @JsonProperty(value = "requestMessage") + private String requestMessage; + + /* + * Status of the shared private link resource + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private SharedPrivateLinkResourceStatus status; + + /** + * Get the groupId property: The group id from the provider of resource the shared private link resource is for. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the groupId property: The group id from the provider of resource the shared private link resource is for. + * + * @param groupId the groupId value to set. + * @return the SharedPrivateLinkResourceProperties object itself. + */ + public SharedPrivateLinkResourceProperties withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the privateLinkResourceId property: The resource id of the resource the shared private link resource is for. + * + * @return the privateLinkResourceId value. + */ + public String privateLinkResourceId() { + return this.privateLinkResourceId; + } + + /** + * Set the privateLinkResourceId property: The resource id of the resource the shared private link resource is for. + * + * @param privateLinkResourceId the privateLinkResourceId value to set. + * @return the SharedPrivateLinkResourceProperties object itself. + */ + public SharedPrivateLinkResourceProperties withPrivateLinkResourceId(String privateLinkResourceId) { + this.privateLinkResourceId = privateLinkResourceId; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the shared private link resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the requestMessage property: The request message for requesting approval of the shared private link resource. + * + * @return the requestMessage value. + */ + public String requestMessage() { + return this.requestMessage; + } + + /** + * Set the requestMessage property: The request message for requesting approval of the shared private link resource. + * + * @param requestMessage the requestMessage value to set. + * @return the SharedPrivateLinkResourceProperties object itself. + */ + public SharedPrivateLinkResourceProperties withRequestMessage(String requestMessage) { + this.requestMessage = requestMessage; + return this; + } + + /** + * Get the status property: Status of the shared private link resource. + * + * @return the status value. + */ + public SharedPrivateLinkResourceStatus status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (groupId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property groupId in model SharedPrivateLinkResourceProperties")); + } + if (privateLinkResourceId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateLinkResourceId in model" + + " SharedPrivateLinkResourceProperties")); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRProperties.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRProperties.java new file mode 100644 index 000000000000..05e1572ddceb --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRProperties.java @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.signalr.models.ProvisioningState; +import com.azure.resourcemanager.signalr.models.ResourceLogConfiguration; +import com.azure.resourcemanager.signalr.models.ServerlessUpstreamSettings; +import com.azure.resourcemanager.signalr.models.SignalRCorsSettings; +import com.azure.resourcemanager.signalr.models.SignalRFeature; +import com.azure.resourcemanager.signalr.models.SignalRNetworkACLs; +import com.azure.resourcemanager.signalr.models.SignalRTlsSettings; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A class that describes the properties of the resource. */ +@Fluent +public final class SignalRProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SignalRProperties.class); + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The publicly accessible IP of the resource. + */ + @JsonProperty(value = "externalIP", access = JsonProperty.Access.WRITE_ONLY) + private String externalIp; + + /* + * FQDN of the service instance. + */ + @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /* + * The publicly accessible port of the resource which is designed for + * browser/client side usage. + */ + @JsonProperty(value = "publicPort", access = JsonProperty.Access.WRITE_ONLY) + private Integer publicPort; + + /* + * The publicly accessible port of the resource which is designed for + * customer server side usage. + */ + @JsonProperty(value = "serverPort", access = JsonProperty.Access.WRITE_ONLY) + private Integer serverPort; + + /* + * Version of the resource. Probably you need the same or higher version of + * client SDKs. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * Private endpoint connections to the resource. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /* + * The list of shared private link resources. + */ + @JsonProperty(value = "sharedPrivateLinkResources", access = JsonProperty.Access.WRITE_ONLY) + private List sharedPrivateLinkResources; + + /* + * TLS settings. + */ + @JsonProperty(value = "tls") + private SignalRTlsSettings tls; + + /* + * Deprecated. + */ + @JsonProperty(value = "hostNamePrefix", access = JsonProperty.Access.WRITE_ONLY) + private String hostnamePrefix; + + /* + * List of the featureFlags. + * + * FeatureFlags that are not included in the parameters for the update + * operation will not be modified. + * And the response will only include featureFlags that are explicitly set. + * When a featureFlag is not explicitly set, its globally default value + * will be used + * But keep in mind, the default value doesn't mean "false". It varies in + * terms of different FeatureFlags. + */ + @JsonProperty(value = "features") + private List features; + + /* + * Resource log configuration of a Microsoft.SignalRService resource. + * If resourceLogConfiguration isn't null or empty, it will override + * options "EnableConnectivityLog" and "EnableMessagingLogs" in features. + * Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" + * in features. + */ + @JsonProperty(value = "resourceLogConfiguration") + private ResourceLogConfiguration resourceLogConfiguration; + + /* + * Cross-Origin Resource Sharing (CORS) settings. + */ + @JsonProperty(value = "cors") + private SignalRCorsSettings cors; + + /* + * Upstream settings when the service is in server-less mode. + */ + @JsonProperty(value = "upstream") + private ServerlessUpstreamSettings upstream; + + /* + * Network ACLs + */ + @JsonProperty(value = "networkACLs") + private SignalRNetworkACLs networkACLs; + + /* + * Enable or disable public network access. Default to "Enabled". + * When it's Enabled, network ACLs still apply. + * When it's Disabled, public network access is always disabled no matter + * what you set in network ACLs. + */ + @JsonProperty(value = "publicNetworkAccess") + private String publicNetworkAccess; + + /* + * DisableLocalAuth + * Enable or disable local auth with AccessKey + * When set as true, connection with AccessKey=xxx won't work. + */ + @JsonProperty(value = "disableLocalAuth") + private Boolean disableLocalAuth; + + /* + * DisableLocalAuth + * Enable or disable aad auth + * When set as true, connection with AuthType=aad won't work. + */ + @JsonProperty(value = "disableAadAuth") + private Boolean disableAadAuth; + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the externalIp property: The publicly accessible IP of the resource. + * + * @return the externalIp value. + */ + public String externalIp() { + return this.externalIp; + } + + /** + * Get the hostname property: FQDN of the service instance. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Get the publicPort property: The publicly accessible port of the resource which is designed for browser/client + * side usage. + * + * @return the publicPort value. + */ + public Integer publicPort() { + return this.publicPort; + } + + /** + * Get the serverPort property: The publicly accessible port of the resource which is designed for customer server + * side usage. + * + * @return the serverPort value. + */ + public Integer serverPort() { + return this.serverPort; + } + + /** + * Get the version property: Version of the resource. Probably you need the same or higher version of client SDKs. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections to the resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the sharedPrivateLinkResources property: The list of shared private link resources. + * + * @return the sharedPrivateLinkResources value. + */ + public List sharedPrivateLinkResources() { + return this.sharedPrivateLinkResources; + } + + /** + * Get the tls property: TLS settings. + * + * @return the tls value. + */ + public SignalRTlsSettings tls() { + return this.tls; + } + + /** + * Set the tls property: TLS settings. + * + * @param tls the tls value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withTls(SignalRTlsSettings tls) { + this.tls = tls; + return this; + } + + /** + * Get the hostnamePrefix property: Deprecated. + * + * @return the hostnamePrefix value. + */ + public String hostnamePrefix() { + return this.hostnamePrefix; + } + + /** + * Get the features property: List of the featureFlags. + * + *

FeatureFlags that are not included in the parameters for the update operation will not be modified. And the + * response will only include featureFlags that are explicitly set. When a featureFlag is not explicitly set, its + * globally default value will be used But keep in mind, the default value doesn't mean "false". It varies in terms + * of different FeatureFlags. + * + * @return the features value. + */ + public List features() { + return this.features; + } + + /** + * Set the features property: List of the featureFlags. + * + *

FeatureFlags that are not included in the parameters for the update operation will not be modified. And the + * response will only include featureFlags that are explicitly set. When a featureFlag is not explicitly set, its + * globally default value will be used But keep in mind, the default value doesn't mean "false". It varies in terms + * of different FeatureFlags. + * + * @param features the features value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withFeatures(List features) { + this.features = features; + return this; + } + + /** + * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If + * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in + * features. + * + * @return the resourceLogConfiguration value. + */ + public ResourceLogConfiguration resourceLogConfiguration() { + return this.resourceLogConfiguration; + } + + /** + * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If + * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in + * features. + * + * @param resourceLogConfiguration the resourceLogConfiguration value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration) { + this.resourceLogConfiguration = resourceLogConfiguration; + return this; + } + + /** + * Get the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @return the cors value. + */ + public SignalRCorsSettings cors() { + return this.cors; + } + + /** + * Set the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @param cors the cors value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withCors(SignalRCorsSettings cors) { + this.cors = cors; + return this; + } + + /** + * Get the upstream property: Upstream settings when the service is in server-less mode. + * + * @return the upstream value. + */ + public ServerlessUpstreamSettings upstream() { + return this.upstream; + } + + /** + * Set the upstream property: Upstream settings when the service is in server-less mode. + * + * @param upstream the upstream value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withUpstream(ServerlessUpstreamSettings upstream) { + this.upstream = upstream; + return this; + } + + /** + * Get the networkACLs property: Network ACLs. + * + * @return the networkACLs value. + */ + public SignalRNetworkACLs networkACLs() { + return this.networkACLs; + } + + /** + * Set the networkACLs property: Network ACLs. + * + * @param networkACLs the networkACLs value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withNetworkACLs(SignalRNetworkACLs networkACLs) { + this.networkACLs = networkACLs; + return this; + } + + /** + * Get the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's + * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what + * you set in network ACLs. + * + * @return the publicNetworkAccess value. + */ + public String publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Enable or disable public network access. Default to "Enabled". When it's + * Enabled, network ACLs still apply. When it's Disabled, public network access is always disabled no matter what + * you set in network ACLs. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withPublicNetworkAccess(String publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true, + * connection with AccessKey=xxx won't work. + * + * @return the disableLocalAuth value. + */ + public Boolean disableLocalAuth() { + return this.disableLocalAuth; + } + + /** + * Set the disableLocalAuth property: DisableLocalAuth Enable or disable local auth with AccessKey When set as true, + * connection with AccessKey=xxx won't work. + * + * @param disableLocalAuth the disableLocalAuth value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withDisableLocalAuth(Boolean disableLocalAuth) { + this.disableLocalAuth = disableLocalAuth; + return this; + } + + /** + * Get the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with + * AuthType=aad won't work. + * + * @return the disableAadAuth value. + */ + public Boolean disableAadAuth() { + return this.disableAadAuth; + } + + /** + * Set the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with + * AuthType=aad won't work. + * + * @param disableAadAuth the disableAadAuth value to set. + * @return the SignalRProperties object itself. + */ + public SignalRProperties withDisableAadAuth(Boolean disableAadAuth) { + this.disableAadAuth = disableAadAuth; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (sharedPrivateLinkResources() != null) { + sharedPrivateLinkResources().forEach(e -> e.validate()); + } + if (tls() != null) { + tls().validate(); + } + if (features() != null) { + features().forEach(e -> e.validate()); + } + if (resourceLogConfiguration() != null) { + resourceLogConfiguration().validate(); + } + if (cors() != null) { + cors().validate(); + } + if (upstream() != null) { + upstream().validate(); + } + if (networkACLs() != null) { + networkACLs().validate(); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRResourceInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRResourceInner.java index a60c4a02553b..5f3b3703823e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRResourceInner.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SignalRResourceInner.java @@ -5,12 +5,12 @@ package com.azure.resourcemanager.signalr.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.signalr.models.ManagedIdentity; import com.azure.resourcemanager.signalr.models.ProvisioningState; +import com.azure.resourcemanager.signalr.models.ResourceLogConfiguration; import com.azure.resourcemanager.signalr.models.ResourceSku; import com.azure.resourcemanager.signalr.models.ServerlessUpstreamSettings; import com.azure.resourcemanager.signalr.models.ServiceKind; @@ -24,9 +24,8 @@ import java.util.Map; /** A class represent a resource. */ -@JsonFlatten @Fluent -public class SignalRResourceInner extends Resource { +public final class SignalRResourceInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SignalRResourceInner.class); /* @@ -35,6 +34,12 @@ public class SignalRResourceInner extends Resource { @JsonProperty(value = "sku") private ResourceSku sku; + /* + * Settings used to provision or configure the resource + */ + @JsonProperty(value = "properties") + private SignalRProperties innerProperties; + /* * The kind of the service - e.g. "SignalR" for * "Microsoft.SignalRService/SignalR" @@ -54,120 +59,6 @@ public class SignalRResourceInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /* - * Provisioning state of the resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The publicly accessible IP of the resource. - */ - @JsonProperty(value = "properties.externalIP", access = JsonProperty.Access.WRITE_ONLY) - private String externalIp; - - /* - * FQDN of the service instance. - */ - @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * The publicly accessible port of the resource which is designed for - * browser/client side usage. - */ - @JsonProperty(value = "properties.publicPort", access = JsonProperty.Access.WRITE_ONLY) - private Integer publicPort; - - /* - * The publicly accessible port of the resource which is designed for - * customer server side usage. - */ - @JsonProperty(value = "properties.serverPort", access = JsonProperty.Access.WRITE_ONLY) - private Integer serverPort; - - /* - * Version of the resource. Probably you need the same or higher version of - * client SDKs. - */ - @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /* - * Private endpoint connections to the resource. - */ - @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /* - * The list of shared private link resources. - */ - @JsonProperty(value = "properties.sharedPrivateLinkResources", access = JsonProperty.Access.WRITE_ONLY) - private List sharedPrivateLinkResources; - - /* - * TLS settings. - */ - @JsonProperty(value = "properties.tls") - private SignalRTlsSettings tls; - - /* - * List of the featureFlags. - * - * FeatureFlags that are not included in the parameters for the update - * operation will not be modified. - * And the response will only include featureFlags that are explicitly set. - * When a featureFlag is not explicitly set, its globally default value - * will be used - * But keep in mind, the default value doesn't mean "false". It varies in - * terms of different FeatureFlags. - */ - @JsonProperty(value = "properties.features") - private List features; - - /* - * Cross-Origin Resource Sharing (CORS) settings. - */ - @JsonProperty(value = "properties.cors") - private SignalRCorsSettings cors; - - /* - * Upstream settings when the service is in server-less mode. - */ - @JsonProperty(value = "properties.upstream") - private ServerlessUpstreamSettings upstream; - - /* - * Network ACLs - */ - @JsonProperty(value = "properties.networkACLs") - private SignalRNetworkACLs networkACLs; - - /* - * Enable or disable public network access. Default to "Enabled". - * When it's Enabled, network ACLs still apply. - * When it's Disabled, public network access is always disabled no matter - * what you set in network ACLs. - */ - @JsonProperty(value = "properties.publicNetworkAccess") - private String publicNetworkAccess; - - /* - * DisableLocalAuth - * Enable or disable local auth with AccessKey - * When set as true, connection with AccessKey=xxx won't work. - */ - @JsonProperty(value = "properties.disableLocalAuth") - private Boolean disableLocalAuth; - - /* - * disableAadAuth - * Enable or disable aad auth - * When set as true, connection with AuthType=aad won't work. - */ - @JsonProperty(value = "properties.disableAadAuth") - private Boolean disableAadAuth; - /** * Get the sku property: The billing information of the resource.(e.g. Free, Standard). * @@ -188,6 +79,15 @@ public SignalRResourceInner withSku(ResourceSku sku) { return this; } + /** + * Get the innerProperties property: Settings used to provision or configure the resource. + * + * @return the innerProperties value. + */ + private SignalRProperties innerProperties() { + return this.innerProperties; + } + /** * Get the kind property: The kind of the service - e.g. "SignalR" for "Microsoft.SignalRService/SignalR". * @@ -237,13 +137,27 @@ public SystemData systemData() { return this.systemData; } + /** {@inheritDoc} */ + @Override + public SignalRResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SignalRResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -252,7 +166,7 @@ public ProvisioningState provisioningState() { * @return the externalIp value. */ public String externalIp() { - return this.externalIp; + return this.innerProperties() == null ? null : this.innerProperties().externalIp(); } /** @@ -261,7 +175,7 @@ public String externalIp() { * @return the hostname value. */ public String hostname() { - return this.hostname; + return this.innerProperties() == null ? null : this.innerProperties().hostname(); } /** @@ -271,7 +185,7 @@ public String hostname() { * @return the publicPort value. */ public Integer publicPort() { - return this.publicPort; + return this.innerProperties() == null ? null : this.innerProperties().publicPort(); } /** @@ -281,7 +195,7 @@ public Integer publicPort() { * @return the serverPort value. */ public Integer serverPort() { - return this.serverPort; + return this.innerProperties() == null ? null : this.innerProperties().serverPort(); } /** @@ -290,7 +204,7 @@ public Integer serverPort() { * @return the version value. */ public String version() { - return this.version; + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** @@ -299,7 +213,7 @@ public String version() { * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.privateEndpointConnections; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } /** @@ -308,7 +222,7 @@ public List privateEndpointConnections() { * @return the sharedPrivateLinkResources value. */ public List sharedPrivateLinkResources() { - return this.sharedPrivateLinkResources; + return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources(); } /** @@ -317,7 +231,7 @@ public List sharedPrivateLinkResources() { * @return the tls value. */ public SignalRTlsSettings tls() { - return this.tls; + return this.innerProperties() == null ? null : this.innerProperties().tls(); } /** @@ -327,10 +241,22 @@ public SignalRTlsSettings tls() { * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withTls(SignalRTlsSettings tls) { - this.tls = tls; + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withTls(tls); return this; } + /** + * Get the hostnamePrefix property: Deprecated. + * + * @return the hostnamePrefix value. + */ + public String hostnamePrefix() { + return this.innerProperties() == null ? null : this.innerProperties().hostnamePrefix(); + } + /** * Get the features property: List of the featureFlags. * @@ -342,7 +268,7 @@ public SignalRResourceInner withTls(SignalRTlsSettings tls) { * @return the features value. */ public List features() { - return this.features; + return this.innerProperties() == null ? null : this.innerProperties().features(); } /** @@ -357,7 +283,39 @@ public List features() { * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withFeatures(List features) { - this.features = features; + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withFeatures(features); + return this; + } + + /** + * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If + * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in + * features. + * + * @return the resourceLogConfiguration value. + */ + public ResourceLogConfiguration resourceLogConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().resourceLogConfiguration(); + } + + /** + * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If + * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in + * features. + * + * @param resourceLogConfiguration the resourceLogConfiguration value to set. + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withResourceLogConfiguration(resourceLogConfiguration); return this; } @@ -367,7 +325,7 @@ public SignalRResourceInner withFeatures(List features) { * @return the cors value. */ public SignalRCorsSettings cors() { - return this.cors; + return this.innerProperties() == null ? null : this.innerProperties().cors(); } /** @@ -377,7 +335,10 @@ public SignalRCorsSettings cors() { * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withCors(SignalRCorsSettings cors) { - this.cors = cors; + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withCors(cors); return this; } @@ -387,7 +348,7 @@ public SignalRResourceInner withCors(SignalRCorsSettings cors) { * @return the upstream value. */ public ServerlessUpstreamSettings upstream() { - return this.upstream; + return this.innerProperties() == null ? null : this.innerProperties().upstream(); } /** @@ -397,7 +358,10 @@ public ServerlessUpstreamSettings upstream() { * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withUpstream(ServerlessUpstreamSettings upstream) { - this.upstream = upstream; + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withUpstream(upstream); return this; } @@ -407,7 +371,7 @@ public SignalRResourceInner withUpstream(ServerlessUpstreamSettings upstream) { * @return the networkACLs value. */ public SignalRNetworkACLs networkACLs() { - return this.networkACLs; + return this.innerProperties() == null ? null : this.innerProperties().networkACLs(); } /** @@ -417,7 +381,10 @@ public SignalRNetworkACLs networkACLs() { * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withNetworkACLs(SignalRNetworkACLs networkACLs) { - this.networkACLs = networkACLs; + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withNetworkACLs(networkACLs); return this; } @@ -429,7 +396,7 @@ public SignalRResourceInner withNetworkACLs(SignalRNetworkACLs networkACLs) { * @return the publicNetworkAccess value. */ public String publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -441,7 +408,10 @@ public String publicNetworkAccess() { * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withPublicNetworkAccess(String publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } @@ -452,7 +422,7 @@ public SignalRResourceInner withPublicNetworkAccess(String publicNetworkAccess) * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { - return this.disableLocalAuth; + return this.innerProperties() == null ? null : this.innerProperties().disableLocalAuth(); } /** @@ -463,43 +433,35 @@ public Boolean disableLocalAuth() { * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withDisableLocalAuth(disableLocalAuth); return this; } /** - * Get the disableAadAuth property: disableAadAuth Enable or disable aad auth When set as true, connection with + * Get the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with * AuthType=aad won't work. * * @return the disableAadAuth value. */ public Boolean disableAadAuth() { - return this.disableAadAuth; + return this.innerProperties() == null ? null : this.innerProperties().disableAadAuth(); } /** - * Set the disableAadAuth property: disableAadAuth Enable or disable aad auth When set as true, connection with + * Set the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with * AuthType=aad won't work. * * @param disableAadAuth the disableAadAuth value to set. * @return the SignalRResourceInner object itself. */ public SignalRResourceInner withDisableAadAuth(Boolean disableAadAuth) { - this.disableAadAuth = disableAadAuth; - return this; - } - - /** {@inheritDoc} */ - @Override - public SignalRResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public SignalRResourceInner withTags(Map tags) { - super.withTags(tags); + if (this.innerProperties() == null) { + this.innerProperties = new SignalRProperties(); + } + this.innerProperties().withDisableAadAuth(disableAadAuth); return this; } @@ -512,29 +474,11 @@ public void validate() { if (sku() != null) { sku().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } if (identity() != null) { identity().validate(); } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (sharedPrivateLinkResources() != null) { - sharedPrivateLinkResources().forEach(e -> e.validate()); - } - if (tls() != null) { - tls().validate(); - } - if (features() != null) { - features().forEach(e -> e.validate()); - } - if (cors() != null) { - cors().validate(); - } - if (upstream() != null) { - upstream().validate(); - } - if (networkACLs() != null) { - networkACLs().validate(); - } } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SkuListInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SkuListInner.java new file mode 100644 index 000000000000..874f1dd5461f --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SkuListInner.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.signalr.models.Sku; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list skus operation response. */ +@Immutable +public final class SkuListInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuListInner.class); + + /* + * The list of skus available for the resource. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * The URL the client should use to fetch the next page (per server side + * paging). + * It's null for now, added for future use. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: The list of skus available for the resource. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's + * null for now, added for future use. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateEndpointConnectionImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateEndpointConnectionImpl.java index 08cf0d77a148..9d2d114a6e18 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateEndpointConnectionImpl.java @@ -10,6 +10,8 @@ import com.azure.resourcemanager.signalr.models.PrivateEndpointConnection; import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.signalr.models.ProvisioningState; +import java.util.Collections; +import java.util.List; public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection { private PrivateEndpointConnectionInner innerObject; @@ -46,6 +48,15 @@ public PrivateEndpoint privateEndpoint() { return this.innerModel().privateEndpoint(); } + public List groupIds() { + List inner = this.innerModel().groupIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { return this.innerModel().privateLinkServiceConnectionState(); } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientImpl.java index ead8495b857c..babb2233e0a0 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientImpl.java @@ -214,7 +214,7 @@ public SignalRSharedPrivateLinkResourcesClient getSignalRSharedPrivateLinkResour this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-06-01-preview"; + this.apiVersion = "2021-10-01"; this.operations = new OperationsClientImpl(this); this.signalRs = new SignalRsClientImpl(this); this.usages = new UsagesClientImpl(this); diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateEndpointConnectionsClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateEndpointConnectionsClientImpl.java index 943edf192f5c..f827a95dce59 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateEndpointConnectionsClientImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateEndpointConnectionsClientImpl.java @@ -843,7 +843,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String privateEndpointConnectionName, String resourceGroupName, String resourceName) { Mono>> mono = @@ -866,7 +866,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); @@ -889,7 +889,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String privateEndpointConnectionName, String resourceGroupName, String resourceName) { return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName).getSyncPoller(); @@ -908,7 +908,7 @@ public SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context) diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRResourceImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRResourceImpl.java index f49a052de49f..bcc7ef12607e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRResourceImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRResourceImpl.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.signalr.models.PrivateEndpointConnection; import com.azure.resourcemanager.signalr.models.ProvisioningState; import com.azure.resourcemanager.signalr.models.RegenerateKeyParameters; +import com.azure.resourcemanager.signalr.models.ResourceLogConfiguration; import com.azure.resourcemanager.signalr.models.ResourceSku; import com.azure.resourcemanager.signalr.models.ServerlessUpstreamSettings; import com.azure.resourcemanager.signalr.models.ServiceKind; @@ -132,6 +133,10 @@ public SignalRTlsSettings tls() { return this.innerModel().tls(); } + public String hostnamePrefix() { + return this.innerModel().hostnamePrefix(); + } + public List features() { List inner = this.innerModel().features(); if (inner != null) { @@ -141,6 +146,10 @@ public List features() { } } + public ResourceLogConfiguration resourceLogConfiguration() { + return this.innerModel().resourceLogConfiguration(); + } + public SignalRCorsSettings cors() { return this.innerModel().cors(); } @@ -328,6 +337,11 @@ public SignalRResourceImpl withFeatures(List features) { return this; } + public SignalRResourceImpl withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration) { + this.innerModel().withResourceLogConfiguration(resourceLogConfiguration); + return this; + } + public SignalRResourceImpl withCors(SignalRCorsSettings cors) { this.innerModel().withCors(cors); return this; diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRSharedPrivateLinkResourcesClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRSharedPrivateLinkResourcesClientImpl.java index ca3f3d2a8ba1..6dd28baad06b 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRSharedPrivateLinkResourcesClientImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRSharedPrivateLinkResourcesClientImpl.java @@ -654,7 +654,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a Shared Private Link Resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SharedPrivateLinkResourceInner> beginCreateOrUpdateAsync( String sharedPrivateLinkResourceName, @@ -687,7 +687,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a Shared Private Link Resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SharedPrivateLinkResourceInner> beginCreateOrUpdateAsync( String sharedPrivateLinkResourceName, @@ -722,7 +722,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a Shared Private Link Resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( String sharedPrivateLinkResourceName, String resourceGroupName, @@ -746,7 +746,7 @@ public SyncPoller, SharedPrivateLinkR * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a Shared Private Link Resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( String sharedPrivateLinkResourceName, String resourceGroupName, @@ -980,7 +980,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { Mono>> mono = @@ -1003,7 +1003,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); @@ -1026,7 +1026,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName).getSyncPoller(); @@ -1045,7 +1045,7 @@ public SyncPoller, Void> beginDelete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context) diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsClientImpl.java index 2004b6da69dc..b20cee750b5b 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsClientImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsClientImpl.java @@ -38,6 +38,7 @@ import com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner; import com.azure.resourcemanager.signalr.fluent.models.SignalRKeysInner; import com.azure.resourcemanager.signalr.fluent.models.SignalRResourceInner; +import com.azure.resourcemanager.signalr.fluent.models.SkuListInner; import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; import com.azure.resourcemanager.signalr.models.RegenerateKeyParameters; import com.azure.resourcemanager.signalr.models.SignalRResourceList; @@ -220,6 +221,21 @@ Mono>> restart( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" + + "/signalR/{resourceName}/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkus( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -979,7 +995,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignalRResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, SignalRResourceInner parameters) { Mono>> mono = @@ -1007,7 +1023,7 @@ private PollerFlux, SignalRResourceInner> begin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignalRResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String resourceName, SignalRResourceInner parameters, Context context) { context = this.client.mergeContext(context); @@ -1031,7 +1047,7 @@ private PollerFlux, SignalRResourceInner> begin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRResourceInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); @@ -1050,7 +1066,7 @@ public SyncPoller, SignalRResourceInner> beginC * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRResourceInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); @@ -1240,7 +1256,7 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); return this @@ -1260,7 +1276,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); @@ -1281,7 +1297,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); } @@ -1298,7 +1314,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String resourceName, Context context) { return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); @@ -1492,7 +1508,7 @@ private Mono>> updateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignalRResourceInner> beginUpdateAsync( String resourceGroupName, String resourceName, SignalRResourceInner parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, resourceName, parameters); @@ -1519,7 +1535,7 @@ private PollerFlux, SignalRResourceInner> begin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignalRResourceInner> beginUpdateAsync( String resourceGroupName, String resourceName, SignalRResourceInner parameters, Context context) { context = this.client.mergeContext(context); @@ -1543,7 +1559,7 @@ private PollerFlux, SignalRResourceInner> begin * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRResourceInner> beginUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters) { return beginUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); @@ -1562,7 +1578,7 @@ public SyncPoller, SignalRResourceInner> beginU * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represent a resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRResourceInner> beginUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters, Context context) { return beginUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); @@ -1920,7 +1936,7 @@ private Mono>> regenerateKeyWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represents the access keys of the resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignalRKeysInner> beginRegenerateKeyAsync( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { Mono>> mono = @@ -1944,7 +1960,7 @@ private PollerFlux, SignalRKeysInner> beginRegenera * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represents the access keys of the resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SignalRKeysInner> beginRegenerateKeyAsync( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { context = this.client.mergeContext(context); @@ -1968,7 +1984,7 @@ private PollerFlux, SignalRKeysInner> beginRegenera * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represents the access keys of the resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRKeysInner> beginRegenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { return beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); @@ -1987,7 +2003,7 @@ public SyncPoller, SignalRKeysInner> beginRegenerat * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a class represents the access keys of the resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRKeysInner> beginRegenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters, Context context) { return beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); @@ -2177,7 +2193,7 @@ private Mono>> restartWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String resourceName) { Mono>> mono = restartWithResponseAsync(resourceGroupName, resourceName); return this @@ -2197,7 +2213,7 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync( String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); @@ -2218,7 +2234,7 @@ private PollerFlux, Void> beginRestartAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName) { return beginRestartAsync(resourceGroupName, resourceName).getSyncPoller(); } @@ -2235,7 +2251,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart( String resourceGroupName, String resourceName, Context context) { return beginRestartAsync(resourceGroupName, resourceName, context).getSyncPoller(); @@ -2307,6 +2323,158 @@ public void restart(String resourceGroupName, String resourceName, Context conte restartAsync(resourceGroupName, resourceName, context).block(); } + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the 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 list skus operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSkus( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @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 list skus operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusWithResponseAsync( + String resourceGroupName, String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSkus( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + accept, + context); + } + + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the 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 list skus operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSkusAsync(String resourceGroupName, String resourceName) { + return listSkusWithResponseAsync(resourceGroupName, resourceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the 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 list skus operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SkuListInner listSkus(String resourceGroupName, String resourceName) { + return listSkusAsync(resourceGroupName, resourceName).block(); + } + + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @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 list skus operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) { + return listSkusWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsImpl.java index 9f2e7a7ea749..8942a1458c87 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRsImpl.java @@ -13,12 +13,14 @@ import com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner; import com.azure.resourcemanager.signalr.fluent.models.SignalRKeysInner; import com.azure.resourcemanager.signalr.fluent.models.SignalRResourceInner; +import com.azure.resourcemanager.signalr.fluent.models.SkuListInner; import com.azure.resourcemanager.signalr.models.NameAvailability; import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; import com.azure.resourcemanager.signalr.models.RegenerateKeyParameters; import com.azure.resourcemanager.signalr.models.SignalRKeys; import com.azure.resourcemanager.signalr.models.SignalRResource; import com.azure.resourcemanager.signalr.models.SignalRs; +import com.azure.resourcemanager.signalr.models.SkuList; import com.fasterxml.jackson.annotation.JsonIgnore; public final class SignalRsImpl implements SignalRs { @@ -162,6 +164,29 @@ public void restart(String resourceGroupName, String resourceName, Context conte this.serviceClient().restart(resourceGroupName, resourceName, context); } + public SkuList listSkus(String resourceGroupName, String resourceName) { + SkuListInner inner = this.serviceClient().listSkus(resourceGroupName, resourceName); + if (inner != null) { + return new SkuListImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) { + Response inner = + this.serviceClient().listSkusWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SkuListImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public SignalRResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SkuListImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SkuListImpl.java new file mode 100644 index 000000000000..c7230403e177 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SkuListImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.implementation; + +import com.azure.resourcemanager.signalr.fluent.models.SkuListInner; +import com.azure.resourcemanager.signalr.models.Sku; +import com.azure.resourcemanager.signalr.models.SkuList; +import java.util.Collections; +import java.util.List; + +public final class SkuListImpl implements SkuList { + private SkuListInner innerObject; + + private final com.azure.resourcemanager.signalr.SignalRManager serviceManager; + + SkuListImpl(SkuListInner innerObject, com.azure.resourcemanager.signalr.SignalRManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public SkuListInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.signalr.SignalRManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/KeyType.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/KeyType.java index f29463be88ca..aa9794aa6627 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/KeyType.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/KeyType.java @@ -16,6 +16,9 @@ public final class KeyType extends ExpandableStringEnum { /** Static value Secondary for KeyType. */ public static final KeyType SECONDARY = fromString("Secondary"); + /** Static value Salt for KeyType. */ + public static final KeyType SALT = fromString("Salt"); + /** * Creates or finds a KeyType from its string representation. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentity.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentity.java index 9563f5526c8f..64d5efa4d002 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentity.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentity.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -25,6 +26,7 @@ public class ManagedIdentity { * Get or set the user assigned identities */ @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /* diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/PrivateEndpointConnection.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/PrivateEndpointConnection.java index 06cfcea3f96d..70dc93f31acf 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/PrivateEndpointConnection.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/PrivateEndpointConnection.java @@ -6,6 +6,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.signalr.fluent.models.PrivateEndpointConnectionInner; +import java.util.List; /** An immutable client-side representation of PrivateEndpointConnection. */ public interface PrivateEndpointConnection { @@ -51,6 +52,13 @@ public interface PrivateEndpointConnection { */ PrivateEndpoint privateEndpoint(); + /** + * Gets the groupIds property: Group IDs. + * + * @return the groupIds value. + */ + List groupIds(); + /** * Gets the privateLinkServiceConnectionState property: Connection state. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ResourceLogCategory.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ResourceLogCategory.java new file mode 100644 index 000000000000..37274c52b7ca --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ResourceLogCategory.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.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; + +/** Resource log category configuration of a Microsoft.SignalRService resource. */ +@Fluent +public final class ResourceLogCategory { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceLogCategory.class); + + /* + * Gets or sets the resource log category's name. + * Available values: ConnectivityLogs, MessagingLogs. + * Case insensitive. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Indicates whether or the resource log category is enabled. + * Available values: true, false. + * Case insensitive. + */ + @JsonProperty(value = "enabled") + private String enabled; + + /** + * Get the name property: Gets or sets the resource log category's name. Available values: ConnectivityLogs, + * MessagingLogs. Case insensitive. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Gets or sets the resource log category's name. Available values: ConnectivityLogs, + * MessagingLogs. Case insensitive. + * + * @param name the name value to set. + * @return the ResourceLogCategory object itself. + */ + public ResourceLogCategory withName(String name) { + this.name = name; + return this; + } + + /** + * Get the enabled property: Indicates whether or the resource log category is enabled. Available values: true, + * false. Case insensitive. + * + * @return the enabled value. + */ + public String enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether or the resource log category is enabled. Available values: true, + * false. Case insensitive. + * + * @param enabled the enabled value to set. + * @return the ResourceLogCategory object itself. + */ + public ResourceLogCategory withEnabled(String enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ResourceLogConfiguration.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ResourceLogConfiguration.java new file mode 100644 index 000000000000..e5b5aff3ad0b --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ResourceLogConfiguration.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.signalr.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; + +/** Resource log configuration of a Microsoft.SignalRService resource. */ +@Fluent +public final class ResourceLogConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceLogConfiguration.class); + + /* + * Gets or sets the list of category configurations. + */ + @JsonProperty(value = "categories") + private List categories; + + /** + * Get the categories property: Gets or sets the list of category configurations. + * + * @return the categories value. + */ + public List categories() { + return this.categories; + } + + /** + * Set the categories property: Gets or sets the list of category configurations. + * + * @param categories the categories value to set. + * @return the ResourceLogConfiguration object itself. + */ + public ResourceLogConfiguration withCategories(List categories) { + this.categories = categories; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (categories() != null) { + categories().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ScaleType.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ScaleType.java new file mode 100644 index 000000000000..da8163e4a613 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ScaleType.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.signalr.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ScaleType. */ +public final class ScaleType extends ExpandableStringEnum { + /** Static value None for ScaleType. */ + public static final ScaleType NONE = fromString("None"); + + /** Static value Manual for ScaleType. */ + public static final ScaleType MANUAL = fromString("Manual"); + + /** Static value Automatic for ScaleType. */ + public static final ScaleType AUTOMATIC = fromString("Automatic"); + + /** + * Creates or finds a ScaleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleType. + */ + @JsonCreator + public static ScaleType fromString(String name) { + return fromString(name, ScaleType.class); + } + + /** @return known ScaleType values. */ + public static Collection values() { + return values(ScaleType.class); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRFeature.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRFeature.java index 6700844c1c98..246dca5bbc1b 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRFeature.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRFeature.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -47,6 +48,7 @@ public final class SignalRFeature { * Optional properties related to this feature. */ @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; /** diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRResource.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRResource.java index 348db5fe204b..9ebc5850bfe9 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRResource.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRResource.java @@ -142,6 +142,13 @@ public interface SignalRResource { */ SignalRTlsSettings tls(); + /** + * Gets the hostnamePrefix property: Deprecated. + * + * @return the hostnamePrefix value. + */ + String hostnamePrefix(); + /** * Gets the features property: List of the featureFlags. * @@ -154,6 +161,16 @@ public interface SignalRResource { */ List features(); + /** + * Gets the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If + * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in + * features. + * + * @return the resourceLogConfiguration value. + */ + ResourceLogConfiguration resourceLogConfiguration(); + /** * Gets the cors property: Cross-Origin Resource Sharing (CORS) settings. * @@ -193,7 +210,7 @@ public interface SignalRResource { Boolean disableLocalAuth(); /** - * Gets the disableAadAuth property: disableAadAuth Enable or disable aad auth When set as true, connection with + * Gets the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, connection with * AuthType=aad won't work. * * @return the disableAadAuth value. @@ -273,6 +290,7 @@ interface WithCreate DefinitionStages.WithIdentity, DefinitionStages.WithTls, DefinitionStages.WithFeatures, + DefinitionStages.WithResourceLogConfiguration, DefinitionStages.WithCors, DefinitionStages.WithUpstream, DefinitionStages.WithNetworkACLs, @@ -364,6 +382,22 @@ interface WithFeatures { */ WithCreate withFeatures(List features); } + /** The stage of the SignalRResource definition allowing to specify resourceLogConfiguration. */ + interface WithResourceLogConfiguration { + /** + * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService + * resource. If resourceLogConfiguration isn't null or empty, it will override options + * "EnableConnectivityLog" and "EnableMessagingLogs" in features. Otherwise, use options + * "EnableConnectivityLog" and "EnableMessagingLogs" in features.. + * + * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. If + * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. + * @return the next definition stage. + */ + WithCreate withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration); + } /** The stage of the SignalRResource definition allowing to specify cors. */ interface WithCors { /** @@ -423,10 +457,10 @@ interface WithDisableLocalAuth { /** The stage of the SignalRResource definition allowing to specify disableAadAuth. */ interface WithDisableAadAuth { /** - * Specifies the disableAadAuth property: disableAadAuth Enable or disable aad auth When set as true, + * Specifies the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, * connection with AuthType=aad won't work.. * - * @param disableAadAuth disableAadAuth Enable or disable aad auth When set as true, connection with + * @param disableAadAuth DisableLocalAuth Enable or disable aad auth When set as true, connection with * AuthType=aad won't work. * @return the next definition stage. */ @@ -447,6 +481,7 @@ interface Update UpdateStages.WithIdentity, UpdateStages.WithTls, UpdateStages.WithFeatures, + UpdateStages.WithResourceLogConfiguration, UpdateStages.WithCors, UpdateStages.WithUpstream, UpdateStages.WithNetworkACLs, @@ -529,6 +564,22 @@ interface WithFeatures { */ Update withFeatures(List features); } + /** The stage of the SignalRResource update allowing to specify resourceLogConfiguration. */ + interface WithResourceLogConfiguration { + /** + * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService + * resource. If resourceLogConfiguration isn't null or empty, it will override options + * "EnableConnectivityLog" and "EnableMessagingLogs" in features. Otherwise, use options + * "EnableConnectivityLog" and "EnableMessagingLogs" in features.. + * + * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. If + * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and + * "EnableMessagingLogs" in features. + * @return the next definition stage. + */ + Update withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration); + } /** The stage of the SignalRResource update allowing to specify cors. */ interface WithCors { /** @@ -588,10 +639,10 @@ interface WithDisableLocalAuth { /** The stage of the SignalRResource update allowing to specify disableAadAuth. */ interface WithDisableAadAuth { /** - * Specifies the disableAadAuth property: disableAadAuth Enable or disable aad auth When set as true, + * Specifies the disableAadAuth property: DisableLocalAuth Enable or disable aad auth When set as true, * connection with AuthType=aad won't work.. * - * @param disableAadAuth disableAadAuth Enable or disable aad auth When set as true, connection with + * @param disableAadAuth DisableLocalAuth Enable or disable aad auth When set as true, connection with * AuthType=aad won't work. * @return the next definition stage. */ diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRs.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRs.java index 587c3d16471a..1d6825c774e6 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRs.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRs.java @@ -216,6 +216,33 @@ SignalRKeys regenerateKey( */ void restart(String resourceGroupName, String resourceName, Context context); + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @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 list skus operation response. + */ + SkuList listSkus(String resourceGroupName, String resourceName); + + /** + * List all available skus of the resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @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 list skus operation response. + */ + Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context); + /** * Get the resource and its properties. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/Sku.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/Sku.java new file mode 100644 index 000000000000..9f07763e5a26 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/Sku.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.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; + +/** Describes an available sku.". */ +@Immutable +public final class Sku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); + + /* + * The resource type that this object applies to + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /* + * The exact set of keys that define this sku. + */ + @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) + private ResourceSku sku; + + /* + * Specifies the unit of the resource. + */ + @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY) + private SkuCapacity capacity; + + /** + * Get the resourceType property: The resource type that this object applies to. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the sku property: The exact set of keys that define this sku. + * + * @return the sku value. + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Get the capacity property: Specifies the unit of the resource. + * + * @return the capacity value. + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (capacity() != null) { + capacity().validate(); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SkuCapacity.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SkuCapacity.java new file mode 100644 index 000000000000..a7675d54fbf1 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SkuCapacity.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.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; +import java.util.List; + +/** Describes scaling information of a sku. */ +@Immutable +public final class SkuCapacity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCapacity.class); + + /* + * The lowest permitted capacity for this resource + */ + @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY) + private Integer minimum; + + /* + * The highest permitted capacity for this resource + */ + @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximum; + + /* + * The default capacity. + */ + @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) + private Integer defaultProperty; + + /* + * Allows capacity value list. + */ + @JsonProperty(value = "allowedValues", access = JsonProperty.Access.WRITE_ONLY) + private List allowedValues; + + /* + * The scale type applicable to the sku. + */ + @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) + private ScaleType scaleType; + + /** + * Get the minimum property: The lowest permitted capacity for this resource. + * + * @return the minimum value. + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Get the maximum property: The highest permitted capacity for this resource. + * + * @return the maximum value. + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Get the defaultProperty property: The default capacity. + * + * @return the defaultProperty value. + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Get the allowedValues property: Allows capacity value list. + * + * @return the allowedValues value. + */ + public List allowedValues() { + return this.allowedValues; + } + + /** + * Get the scaleType property: The scale type applicable to the sku. + * + * @return the scaleType value. + */ + public ScaleType scaleType() { + return this.scaleType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SkuList.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SkuList.java new file mode 100644 index 000000000000..332e83ca2109 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SkuList.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.models; + +import com.azure.resourcemanager.signalr.fluent.models.SkuListInner; +import java.util.List; + +/** An immutable client-side representation of SkuList. */ +public interface SkuList { + /** + * Gets the value property: The list of skus available for the resource. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's + * null for now, added for future use. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.signalr.fluent.models.SkuListInner object. + * + * @return the inner object. + */ + SkuListInner innerModel(); +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsListSamples.java deleted file mode 100644 index c2625a1852c1..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr; - -import com.azure.core.util.Context; - -/** Samples for SignalRPrivateEndpointConnections List. */ -public final class SignalRPrivateEndpointConnectionsListSamples { - /** - * Sample code: SignalRPrivateEndpointConnections_List. - * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. - */ - public static void signalRPrivateEndpointConnectionsList( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRPrivateEndpointConnections().list("myResourceGroup", "mySignalRService", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateLinkResourcesListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateLinkResourcesListSamples.java deleted file mode 100644 index e85f9f25b530..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr; - -import com.azure.core.util.Context; - -/** Samples for SignalRPrivateLinkResources List. */ -public final class SignalRPrivateLinkResourcesListSamples { - /** - * Sample code: SignalRPrivateLinkResources_List. - * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. - */ - public static void signalRPrivateLinkResourcesList( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesListSamples.java deleted file mode 100644 index be17864e9977..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr; - -import com.azure.core.util.Context; - -/** Samples for SignalRSharedPrivateLinkResources List. */ -public final class SignalRSharedPrivateLinkResourcesListSamples { - /** - * Sample code: SignalRSharedPrivateLinkResources_List. - * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. - */ - public static void signalRSharedPrivateLinkResourcesList( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRSharedPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/OperationsListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/OperationsListSamples.java similarity index 54% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/OperationsListSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/OperationsListSamples.java index ae5376408640..386da70fcd90 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/OperationsListSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/OperationsListSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json + */ /** * Sample code: Operations_List. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void operationsList(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.operations().list(Context.NONE); + public static void operationsList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.operations().list(Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCheckNameAvailabilitySamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRCheckNameAvailabilitySamples.java similarity index 70% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCheckNameAvailabilitySamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRCheckNameAvailabilitySamples.java index 929155e0674b..60058689e7e9 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCheckNameAvailabilitySamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRCheckNameAvailabilitySamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; /** Samples for SignalR CheckNameAvailability. */ public final class SignalRCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CheckNameAvailability.json + */ /** * Sample code: SignalR_CheckNameAvailability. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRCheckNameAvailability(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + public static void signalRCheckNameAvailability(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRs() .checkNameAvailabilityWithResponse( "eastus", diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCreateOrUpdateSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRCreateOrUpdateSamples.java similarity index 94% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCreateOrUpdateSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRCreateOrUpdateSamples.java index f89a365ddb29..b6d097148dca 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRCreateOrUpdateSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRCreateOrUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.resourcemanager.signalr.models.AclAction; import com.azure.resourcemanager.signalr.models.FeatureFlags; @@ -29,13 +29,16 @@ /** Samples for SignalR CreateOrUpdate. */ public final class SignalRCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_CreateOrUpdate.json + */ /** * Sample code: SignalR_CreateOrUpdate. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRCreateOrUpdate(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + public static void signalRCreateOrUpdate(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRs() .define("mySignalRService") .withRegion("eastus") diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRDeleteSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRDeleteSamples.java similarity index 51% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRDeleteSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRDeleteSamples.java index c9ca7581d690..7994d1dd433e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRDeleteSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRDeleteSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalR Delete. */ public final class SignalRDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Delete.json + */ /** * Sample code: SignalR_Delete. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRDelete(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRs().delete("myResourceGroup", "mySignalRService", Context.NONE); + public static void signalRDelete(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().delete("myResourceGroup", "mySignalRService", Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRGetByResourceGroupSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRGetByResourceGroupSamples.java similarity index 51% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRGetByResourceGroupSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRGetByResourceGroupSamples.java index 40cbcafb5325..bd547e826fad 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRGetByResourceGroupSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRGetByResourceGroupSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalR GetByResourceGroup. */ public final class SignalRGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Get.json + */ /** * Sample code: SignalR_Get. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRGet(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRs().getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + public static void signalRGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListByResourceGroupSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListByResourceGroupSamples.java similarity index 52% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListByResourceGroupSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListByResourceGroupSamples.java index 5b241c6a80da..e4a497c8f163 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListByResourceGroupSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListByResourceGroupSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalR ListByResourceGroup. */ public final class SignalRListByResourceGroupSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListByResourceGroup.json + */ /** * Sample code: SignalR_ListByResourceGroup. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRListByResourceGroup(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRs().listByResourceGroup("myResourceGroup", Context.NONE); + public static void signalRListByResourceGroup(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().listByResourceGroup("myResourceGroup", Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListKeysSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListKeysSamples.java similarity index 50% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListKeysSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListKeysSamples.java index 0336b239b866..ec93b22d6ee8 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListKeysSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListKeysSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalR ListKeys. */ public final class SignalRListKeysSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListKeys.json + */ /** * Sample code: SignalR_ListKeys. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRListKeys(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRs().listKeysWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + public static void signalRListKeys(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().listKeysWithResponse("myResourceGroup", "mySignalRService", Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListSamples.java similarity index 53% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListSamples.java index 9dd6845524dd..0c6aebe56a6d 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRListSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalR List. */ public final class SignalRListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListBySubscription.json + */ /** * Sample code: SignalR_ListBySubscription. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRListBySubscription(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRs().list(Context.NONE); + public static void signalRListBySubscription(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().list(Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListSkusSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListSkusSamples.java new file mode 100644 index 000000000000..2f7d97581041 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRListSkusSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +import com.azure.core.util.Context; + +/** Samples for SignalR ListSkus. */ +public final class SignalRListSkusSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_ListSkus.json + */ + /** + * Sample code: SignalR_ListSkus. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRListSkus(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().listSkusWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsDeleteSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsDeleteSamples.java similarity index 66% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsDeleteSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsDeleteSamples.java index a183f7d12ae8..5551f9f3d641 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsDeleteSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalRPrivateEndpointConnections Delete. */ public final class SignalRPrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Delete.json + */ /** * Sample code: SignalRPrivateEndpointConnections_Delete. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ public static void signalRPrivateEndpointConnectionsDelete( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRPrivateEndpointConnections() .delete( "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsGetSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsGetSamples.java similarity index 61% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsGetSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsGetSamples.java index a862bc93d055..89c96d0ce17e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsGetSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsGetSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalRPrivateEndpointConnections Get. */ public final class SignalRPrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Get.json + */ /** * Sample code: SignalRPrivateEndpointConnections_Get. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRPrivateEndpointConnectionsGet( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + public static void signalRPrivateEndpointConnectionsGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRPrivateEndpointConnections() .getWithResponse( "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsListSamples.java new file mode 100644 index 000000000000..64ae4add8a5e --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +import com.azure.core.util.Context; + +/** Samples for SignalRPrivateEndpointConnections List. */ +public final class SignalRPrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_List.json + */ + /** + * Sample code: SignalRPrivateEndpointConnections_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRPrivateEndpointConnectionsList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRPrivateEndpointConnections().list("myResourceGroup", "mySignalRService", Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsUpdateSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsUpdateSamples.java similarity index 82% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsUpdateSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsUpdateSamples.java index 26368daa8a5e..700d8c2d8ece 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRPrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.signalr.fluent.models.PrivateEndpointConnectionInner; @@ -12,14 +12,17 @@ /** Samples for SignalRPrivateEndpointConnections Update. */ public final class SignalRPrivateEndpointConnectionsUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateEndpointConnections_Update.json + */ /** * Sample code: SignalRPrivateEndpointConnections_Update. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ public static void signalRPrivateEndpointConnectionsUpdate( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRPrivateEndpointConnections() .updateWithResponse( "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateLinkResourcesListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateLinkResourcesListSamples.java new file mode 100644 index 000000000000..ab67cb7c59e2 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateLinkResourcesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +import com.azure.core.util.Context; + +/** Samples for SignalRPrivateLinkResources List. */ +public final class SignalRPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRPrivateLinkResources_List.json + */ + /** + * Sample code: SignalRPrivateLinkResources_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRPrivateLinkResourcesList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRegenerateKeySamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRegenerateKeySamples.java similarity index 70% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRegenerateKeySamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRegenerateKeySamples.java index d9a1250323b5..56cd3e91c4fb 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRegenerateKeySamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRegenerateKeySamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.signalr.models.KeyType; @@ -10,13 +10,16 @@ /** Samples for SignalR RegenerateKey. */ public final class SignalRRegenerateKeySamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_RegenerateKey.json + */ /** * Sample code: SignalR_RegenerateKey. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRRegenerateKey(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + public static void signalRRegenerateKey(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRs() .regenerateKey( "myResourceGroup", diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRestartSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRestartSamples.java similarity index 51% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRestartSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRestartSamples.java index c0fbf967f439..f5f5aec1ec9a 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRRestartSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRestartSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalR Restart. */ public final class SignalRRestartSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Restart.json + */ /** * Sample code: SignalR_Restart. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRRestart(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.signalRs().restart("myResourceGroup", "mySignalRService", Context.NONE); + public static void signalRRestart(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRs().restart("myResourceGroup", "mySignalRService", Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java similarity index 70% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java index 336062e02f6d..d839213926ac 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; /** Samples for SignalRSharedPrivateLinkResources CreateOrUpdate. */ public final class SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json + */ /** * Sample code: SignalRSharedPrivateLinkResources_CreateOrUpdate. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ public static void signalRSharedPrivateLinkResourcesCreateOrUpdate( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRSharedPrivateLinkResources() .define("upstream") .withExistingSignalR("myResourceGroup", "mySignalRService") diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesDeleteSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteSamples.java similarity index 62% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesDeleteSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteSamples.java index 271bd66ccda0..d3ee50d8528e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesDeleteSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalRSharedPrivateLinkResources Delete. */ public final class SignalRSharedPrivateLinkResourcesDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Delete.json + */ /** * Sample code: SignalRSharedPrivateLinkResources_Delete. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ public static void signalRSharedPrivateLinkResourcesDelete( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRSharedPrivateLinkResources() .delete("upstream", "myResourceGroup", "mySignalRService", Context.NONE); } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesGetSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetSamples.java similarity index 56% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesGetSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetSamples.java index 91803d786771..75b515909fd6 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRSharedPrivateLinkResourcesGetSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for SignalRSharedPrivateLinkResources Get. */ public final class SignalRSharedPrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_Get.json + */ /** * Sample code: SignalRSharedPrivateLinkResources_Get. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRSharedPrivateLinkResourcesGet( - com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager + public static void signalRSharedPrivateLinkResourcesGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager .signalRSharedPrivateLinkResources() .getWithResponse("upstream", "myResourceGroup", "mySignalRService", Context.NONE); } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesListSamples.java new file mode 100644 index 000000000000..ce41e0e3b885 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +import com.azure.core.util.Context; + +/** Samples for SignalRSharedPrivateLinkResources List. */ +public final class SignalRSharedPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalRSharedPrivateLinkResources_List.json + */ + /** + * Sample code: SignalRSharedPrivateLinkResources_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRSharedPrivateLinkResourcesList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRSharedPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRUpdateSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRUpdateSamples.java similarity index 94% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRUpdateSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRUpdateSamples.java index af0b008d3848..1c4d233dcb45 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/SignalRUpdateSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.signalr.models.AclAction; @@ -30,14 +30,17 @@ /** Samples for SignalR Update. */ public final class SignalRUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/SignalR_Update.json + */ /** * Sample code: SignalR_Update. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void signalRUpdate(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { + public static void signalRUpdate(com.azure.resourcemanager.signalr.SignalRManager manager) { SignalRResource resource = - signalRManager + manager .signalRs() .getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE) .getValue(); diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/UsagesListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/UsagesListSamples.java similarity index 53% rename from sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/UsagesListSamples.java rename to sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/UsagesListSamples.java index 8310a17b977d..dc4dff473088 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/UsagesListSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/UsagesListSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.signalr; +package com.azure.resourcemanager.signalr.generated; import com.azure.core.util.Context; /** Samples for Usages List. */ public final class UsagesListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json + */ /** * Sample code: Usages_List. * - * @param signalRManager Entry point to SignalRManager. REST API for Azure SignalR Service. + * @param manager Entry point to SignalRManager. */ - public static void usagesList(com.azure.resourcemanager.signalr.SignalRManager signalRManager) { - signalRManager.usages().list("eastus", Context.NONE); + public static void usagesList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.usages().list("eastus", Context.NONE); } }