From e740309a799b60f21f148eb082331f18e0287ae4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 17 Mar 2023 05:18:06 +0000 Subject: [PATCH] CodeGen from PR 22948 in Azure/azure-rest-api-specs Merge 6b923928dcf81d37ff31dd3e15621b8a5ae9355b into fce14bf881523f16b14d8ecf325e004465cdcf56 --- .../CHANGELOG.md | 4 +- .../azure-resourcemanager-signalr/README.md | 4 +- .../azure-resourcemanager-signalr/SAMPLE.md | 369 ++-- .../azure-resourcemanager-signalr/pom.xml | 10 +- .../signalr/SignalRManager.java | 18 +- .../SignalRCustomCertificatesClient.java | 30 +- .../fluent/SignalRCustomDomainsClient.java | 36 +- .../fluent/SignalRManagementClient.java | 10 +- ...gnalRPrivateEndpointConnectionsClient.java | 54 +- .../SignalRPrivateLinkResourcesClient.java | 6 +- .../signalr/fluent/SignalRReplicasClient.java | 291 ++++ ...gnalRSharedPrivateLinkResourcesClient.java | 36 +- .../signalr/fluent/SignalRsClient.java | 84 +- .../fluent/models/CustomCertificateInner.java | 28 +- .../fluent/models/CustomDomainInner.java | 28 +- .../PrivateEndpointConnectionInner.java | 28 +- .../models/PrivateLinkResourceInner.java | 16 + .../signalr/fluent/models/ReplicaInner.java | 114 ++ .../fluent/models/ReplicaProperties.java | 40 + .../SharedPrivateLinkResourceInner.java | 28 +- .../fluent/models/SignalRResourceInner.java | 4 +- .../PrivateLinkResourceImpl.java | 5 + .../signalr/implementation/ReplicaImpl.java | 192 ++ .../SignalRCustomCertificatesClientImpl.java | 97 +- .../SignalRCustomDomainsClientImpl.java | 115 +- .../SignalRManagementClientBuilder.java | 6 +- .../SignalRManagementClientImpl.java | 27 +- ...RPrivateEndpointConnectionsClientImpl.java | 155 +- ...SignalRPrivateLinkResourcesClientImpl.java | 21 +- .../SignalRReplicasClientImpl.java | 1547 +++++++++++++++++ .../implementation/SignalRReplicasImpl.java | 196 +++ ...RSharedPrivateLinkResourcesClientImpl.java | 116 +- .../implementation/SignalRsClientImpl.java | 265 +-- .../signalr/models/AclAction.java | 9 + .../signalr/models/CustomCertificate.java | 5 +- .../signalr/models/CustomDomain.java | 5 +- .../signalr/models/FeatureFlags.java | 9 + .../signalr/models/KeyType.java | 9 + .../signalr/models/ManagedIdentity.java | 2 +- .../signalr/models/ManagedIdentityType.java | 9 + .../models/PrivateEndpointConnection.java | 2 +- .../signalr/models/PrivateLinkResource.java | 8 + .../PrivateLinkServiceConnectionStatus.java | 9 + .../signalr/models/ProvisioningState.java | 9 + .../signalr/models/Replica.java | 260 +++ .../signalr/models/ReplicaList.java | 84 + .../signalr/models/ScaleType.java | 9 + .../signalr/models/ServiceKind.java | 9 + .../models/SharedPrivateLinkResource.java | 5 +- .../SharedPrivateLinkResourceStatus.java | 9 + .../models/SignalRCustomCertificates.java | 18 +- .../signalr/models/SignalRCustomDomains.java | 18 +- .../SignalRPrivateEndpointConnections.java | 42 +- .../models/SignalRPrivateLinkResources.java | 6 +- .../signalr/models/SignalRReplicas.java | 170 ++ .../signalr/models/SignalRRequestType.java | 9 + .../signalr/models/SignalRResource.java | 5 +- .../SignalRSharedPrivateLinkResources.java | 18 +- .../signalr/models/SignalRSkuTier.java | 9 + .../signalr/models/SignalRTlsSettings.java | 9 +- .../signalr/models/SignalRs.java | 42 +- .../signalr/models/UpstreamAuthType.java | 9 + .../generated/OperationsListSamples.java | 6 +- .../SignalRCheckNameAvailabilitySamples.java | 5 +- .../SignalRCreateOrUpdateSamples.java | 4 +- ...stomCertificatesCreateOrUpdateSamples.java | 2 +- ...ignalRCustomCertificatesDeleteSamples.java | 6 +- .../SignalRCustomCertificatesGetSamples.java | 6 +- .../SignalRCustomCertificatesListSamples.java | 8 +- ...alRCustomDomainsCreateOrUpdateSamples.java | 2 +- .../SignalRCustomDomainsDeleteSamples.java | 8 +- .../SignalRCustomDomainsGetSamples.java | 8 +- .../SignalRCustomDomainsListSamples.java | 6 +- .../generated/SignalRDeleteSamples.java | 6 +- .../SignalRGetByResourceGroupSamples.java | 8 +- .../SignalRListByResourceGroupSamples.java | 6 +- .../generated/SignalRListKeysSamples.java | 8 +- .../signalr/generated/SignalRListSamples.java | 6 +- .../generated/SignalRListSkusSamples.java | 8 +- ...ivateEndpointConnectionsDeleteSamples.java | 6 +- ...RPrivateEndpointConnectionsGetSamples.java | 6 +- ...PrivateEndpointConnectionsListSamples.java | 8 +- ...ivateEndpointConnectionsUpdateSamples.java | 10 +- ...ignalRPrivateLinkResourcesListSamples.java | 8 +- .../SignalRRegenerateKeySamples.java | 5 +- .../SignalRReplicasCreateOrUpdateSamples.java | 43 + .../SignalRReplicasDeleteSamples.java | 23 + .../generated/SignalRReplicasGetSamples.java | 23 + .../generated/SignalRReplicasListSamples.java | 20 + .../SignalRReplicasRestartSamples.java | 23 + .../SignalRReplicasUpdateSamples.java | 47 + .../generated/SignalRRestartSamples.java | 6 +- ...ateLinkResourcesCreateOrUpdateSamples.java | 2 +- ...aredPrivateLinkResourcesDeleteSamples.java | 6 +- ...RSharedPrivateLinkResourcesGetSamples.java | 6 +- ...SharedPrivateLinkResourcesListSamples.java | 8 +- .../generated/SignalRUpdateSamples.java | 7 +- .../signalr/generated/UsagesListSamples.java | 6 +- .../generated/CustomDomainInnerTests.java | 35 - .../generated/CustomDomainListTests.java | 41 - .../CustomDomainPropertiesTests.java | 35 - .../signalr/generated/DimensionTests.java | 40 - .../generated/LiveTraceCategoryTests.java | 30 - .../LiveTraceConfigurationTests.java | 44 - .../generated/LogSpecificationTests.java | 30 - .../ManagedIdentitySettingsTests.java | 26 - .../generated/ManagedIdentityTests.java | 54 - .../generated/MetricSpecificationTests.java | 72 - .../generated/NameAvailabilityInnerTests.java | 33 - .../NameAvailabilityParametersTests.java | 31 - .../signalr/generated/NetworkAclTests.java | 41 - .../generated/OperationDisplayTests.java | 40 - .../generated/OperationInnerTests.java | 61 - .../signalr/generated/OperationListTests.java | 85 - .../generated/OperationPropertiesTests.java | 84 - .../generated/OperationsListMockTests.java | 74 - .../generated/PrivateEndpointAclTests.java | 44 - .../PrivateEndpointConnectionInnerTests.java | 49 - .../PrivateEndpointConnectionListTests.java | 34 - ...vateEndpointConnectionPropertiesTests.java | 49 - .../generated/PrivateEndpointTests.java | 25 - .../PrivateLinkResourceInnerTests.java | 46 - .../PrivateLinkResourceListTests.java | 53 - .../PrivateLinkResourcePropertiesTests.java | 60 - ...rivateLinkServiceConnectionStateTests.java | 38 - .../generated/ResourceLogCategoryTests.java | 28 - .../ResourceLogConfigurationTests.java | 41 - .../generated/ResourceReferenceTests.java | 25 - .../signalr/generated/ResourceSkuTests.java | 35 - .../generated/ServerlessSettingsTests.java | 26 - .../ServerlessUpstreamSettingsTests.java | 63 - .../generated/ServiceSpecificationTests.java | 64 - ...blePrivateLinkResourcePropertiesTests.java | 36 - ...ShareablePrivateLinkResourceTypeTests.java | 43 - .../SharedPrivateLinkResourceInnerTests.java | 37 - .../SharedPrivateLinkResourceListTests.java | 54 - ...redPrivateLinkResourcePropertiesTests.java | 37 - .../generated/SignalRCorsSettingsTests.java | 31 - ...rtificatesDeleteWithResponseMockTests.java | 64 - .../SignalRCustomDomainsDeleteMockTests.java | 62 - ...CustomDomainsGetWithResponseMockTests.java | 72 - .../SignalRCustomDomainsListMockTests.java | 70 - .../generated/SignalRFeatureTests.java | 51 - .../generated/SignalRNetworkACLsTests.java | 85 - ...ateEndpointConnectionsDeleteMockTests.java | 62 - ...ntConnectionsGetWithResponseMockTests.java | 77 - ...ivateEndpointConnectionsListMockTests.java | 79 - ...onnectionsUpdateWithResponseMockTests.java | 91 - ...nalRPrivateLinkResourcesListMockTests.java | 71 - .../generated/SignalRPropertiesTests.java | 182 -- .../generated/SignalRResourceInnerTests.java | 140 -- .../generated/SignalRResourceListTests.java | 156 -- ...eLinkResourcesCreateOrUpdateMockTests.java | 76 - ...edPrivateLinkResourcesDeleteMockTests.java | 62 - ...LinkResourcesGetWithResponseMockTests.java | 73 - ...aredPrivateLinkResourcesListMockTests.java | 71 - .../generated/SignalRTlsSettingsTests.java | 26 - .../generated/SignalRUsageInnerTests.java | 46 - .../generated/SignalRUsageListTests.java | 74 - .../generated/SignalRUsageNameTests.java | 28 - ...NameAvailabilityWithResponseMockTests.java | 74 - .../SignalRsCreateOrUpdateMockTests.java | 132 -- .../generated/SignalRsDeleteMockTests.java | 62 - ...tByResourceGroupWithResponseMockTests.java | 85 - .../SignalRsListByResourceGroupMockTests.java | 85 - .../generated/SignalRsListMockTests.java | 85 - ...SignalRsListSkusWithResponseMockTests.java | 64 - .../signalr/generated/SkuCapacityTests.java | 26 - .../signalr/generated/SkuListInnerTests.java | 26 - .../signalr/generated/SkuTests.java | 26 - .../generated/UpstreamAuthSettingsTests.java | 35 - .../generated/UpstreamTemplateTests.java | 51 - .../generated/UsagesListMockTests.java | 73 - .../UserAssignedIdentityPropertyTests.java | 25 - 174 files changed, 4112 insertions(+), 5382 deletions(-) create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRReplicasClient.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaInner.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaProperties.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/ReplicaImpl.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasClientImpl.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasImpl.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/Replica.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ReplicaList.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRReplicas.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasCreateOrUpdateSamples.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasDeleteSamples.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasGetSamples.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasListSamples.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasRestartSamples.java create mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasUpdateSamples.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainListTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainPropertiesTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/DimensionTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceCategoryTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceConfigurationTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LogSpecificationTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentitySettingsTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentityTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/MetricSpecificationTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityParametersTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NetworkAclTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationDisplayTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationListTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationPropertiesTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationsListMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointAclTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionListTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceListTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogCategoryTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogConfigurationTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceReferenceTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceSkuTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessSettingsTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessUpstreamSettingsTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServiceSpecificationTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourceTypeTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceListTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCorsSettingsTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomCertificatesDeleteWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsDeleteMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsGetWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsListMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRFeatureTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRNetworkACLsTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsDeleteMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsListMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsUpdateWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateLinkResourcesListMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPropertiesTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceListTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesListMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRTlsSettingsTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageListTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageNameTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCreateOrUpdateMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsDeleteMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListByResourceGroupMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListSkusWithResponseMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuCapacityTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuListInnerTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamAuthSettingsTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamTemplateTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UsagesListMockTests.java delete mode 100644 sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UserAssignedIdentityPropertyTests.java diff --git a/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md b/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md index a1588ad3c7dd..ffdc7cf51998 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md +++ b/sdk/signalr/azure-resourcemanager-signalr/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.1 (2023-03-17) + +- 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-2023-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/signalr/azure-resourcemanager-signalr/README.md b/sdk/signalr/azure-resourcemanager-signalr/README.md index 162ec62ab064..d65c309f9bc3 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-2022-08-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-2023-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-signalr - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md b/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md index 18c32ded7651..754ef28a4676 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md +++ b/sdk/signalr/azure-resourcemanager-signalr/SAMPLE.md @@ -44,6 +44,15 @@ - [List](#signalrprivatelinkresources_list) +## SignalRReplicas + +- [CreateOrUpdate](#signalrreplicas_createorupdate) +- [Delete](#signalrreplicas_delete) +- [Get](#signalrreplicas_get) +- [List](#signalrreplicas_list) +- [Restart](#signalrreplicas_restart) +- [Update](#signalrreplicas_update) + ## SignalRSharedPrivateLinkResources - [CreateOrUpdate](#signalrsharedprivatelinkresources_createorupdate) @@ -57,12 +66,10 @@ ### 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/preview/2022-08-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -70,7 +77,7 @@ public final class OperationsListSamples { * @param manager Entry point to SignalRManager. */ public static void operationsList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -78,13 +85,12 @@ public final class OperationsListSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_CheckNameAvailability.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_CheckNameAvailability.json */ /** * Sample code: SignalR_CheckNameAvailability. @@ -99,7 +105,7 @@ public final class SignalRCheckNameAvailabilitySamples { new NameAvailabilityParameters() .withType("Microsoft.SignalRService/SignalR") .withName("mySignalRService"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -136,7 +142,7 @@ import java.util.Map; /** Samples for SignalR CreateOrUpdate. */ public final class SignalRCreateOrUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalR_CreateOrUpdate.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_CreateOrUpdate.json */ /** * Sample code: SignalR_CreateOrUpdate. @@ -150,7 +156,7 @@ public final class SignalRCreateOrUpdateSamples { .withRegion("eastus") .withExistingResourceGroup("myResourceGroup") .withTags(mapOf("key1", "value1")) - .withSku(new ResourceSku().withName("Standard_S1").withTier(SignalRSkuTier.STANDARD).withCapacity(1)) + .withSku(new ResourceSku().withName("Premium_P1").withTier(SignalRSkuTier.PREMIUM).withCapacity(1)) .withKind(ServiceKind.SIGNALR) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new SignalRTlsSettings().withClientCertEnabled(false)) @@ -227,12 +233,10 @@ public final class SignalRCreateOrUpdateSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_Delete.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_Delete.json */ /** * Sample code: SignalR_Delete. @@ -240,7 +244,7 @@ public final class SignalRDeleteSamples { * @param manager Entry point to SignalRManager. */ public static void signalRDelete(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().delete("myResourceGroup", "mySignalRService", Context.NONE); + manager.signalRs().delete("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -248,12 +252,10 @@ public final class SignalRDeleteSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_Get.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_Get.json */ /** * Sample code: SignalR_Get. @@ -261,7 +263,9 @@ public final class SignalRGetByResourceGroupSamples { * @param manager Entry point to SignalRManager. */ public static void signalRGet(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRs() + .getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -269,12 +273,10 @@ public final class SignalRGetByResourceGroupSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_ListBySubscription.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_ListBySubscription.json */ /** * Sample code: SignalR_ListBySubscription. @@ -282,7 +284,7 @@ public final class SignalRListSamples { * @param manager Entry point to SignalRManager. */ public static void signalRListBySubscription(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().list(Context.NONE); + manager.signalRs().list(com.azure.core.util.Context.NONE); } } ``` @@ -290,12 +292,10 @@ public final class SignalRListSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_ListByResourceGroup.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_ListByResourceGroup.json */ /** * Sample code: SignalR_ListByResourceGroup. @@ -303,7 +303,7 @@ public final class SignalRListByResourceGroupSamples { * @param manager Entry point to SignalRManager. */ public static void signalRListByResourceGroup(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().listByResourceGroup("myResourceGroup", Context.NONE); + manager.signalRs().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } } ``` @@ -311,12 +311,10 @@ public final class SignalRListByResourceGroupSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_ListKeys.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_ListKeys.json */ /** * Sample code: SignalR_ListKeys. @@ -324,7 +322,9 @@ public final class SignalRListKeysSamples { * @param manager Entry point to SignalRManager. */ public static void signalRListKeys(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().listKeysWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRs() + .listKeysWithResponse("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -332,12 +332,10 @@ public final class SignalRListKeysSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_ListSkus.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_ListSkus.json */ /** * Sample code: SignalR_ListSkus. @@ -345,7 +343,9 @@ public final class SignalRListSkusSamples { * @param manager Entry point to SignalRManager. */ public static void signalRListSkus(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().listSkusWithResponse("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRs() + .listSkusWithResponse("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -353,14 +353,13 @@ public final class SignalRListSkusSamples { ### 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/preview/2022-08-01-preview/examples/SignalR_RegenerateKey.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_RegenerateKey.json */ /** * Sample code: SignalR_RegenerateKey. @@ -374,7 +373,7 @@ public final class SignalRRegenerateKeySamples { "myResourceGroup", "mySignalRService", new RegenerateKeyParameters().withKeyType(KeyType.PRIMARY), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -382,12 +381,10 @@ public final class SignalRRegenerateKeySamples { ### 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/preview/2022-08-01-preview/examples/SignalR_Restart.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_Restart.json */ /** * Sample code: SignalR_Restart. @@ -395,7 +392,7 @@ public final class SignalRRestartSamples { * @param manager Entry point to SignalRManager. */ public static void signalRRestart(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().restart("myResourceGroup", "mySignalRService", Context.NONE); + manager.signalRs().restart("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -403,7 +400,6 @@ public final class SignalRRestartSamples { ### 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.LiveTraceCategory; @@ -433,7 +429,7 @@ import java.util.Map; /** Samples for SignalR Update. */ public final class SignalRUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalR_Update.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_Update.json */ /** * Sample code: SignalR_Update. @@ -444,12 +440,12 @@ public final class SignalRUpdateSamples { SignalRResource resource = manager .signalRs() - .getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE) + .getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE) .getValue(); resource .update() .withTags(mapOf("key1", "value1")) - .withSku(new ResourceSku().withName("Standard_S1").withTier(SignalRSkuTier.STANDARD).withCapacity(1)) + .withSku(new ResourceSku().withName("Premium_P1").withTier(SignalRSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new SignalRTlsSettings().withClientCertEnabled(false)) .withFeatures( @@ -528,7 +524,7 @@ public final class SignalRUpdateSamples { /** Samples for SignalRCustomCertificates CreateOrUpdate. */ public final class SignalRCustomCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomCertificates_CreateOrUpdate.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomCertificates_CreateOrUpdate.json */ /** * Sample code: SignalRCustomCertificates_CreateOrUpdate. @@ -552,12 +548,10 @@ public final class SignalRCustomCertificatesCreateOrUpdateSamples { ### SignalRCustomCertificates_Delete ```java -import com.azure.core.util.Context; - /** Samples for SignalRCustomCertificates Delete. */ public final class SignalRCustomCertificatesDeleteSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomCertificates_Delete.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomCertificates_Delete.json */ /** * Sample code: SignalRCustomCertificates_Delete. @@ -567,7 +561,7 @@ public final class SignalRCustomCertificatesDeleteSamples { public static void signalRCustomCertificatesDelete(com.azure.resourcemanager.signalr.SignalRManager manager) { manager .signalRCustomCertificates() - .deleteWithResponse("myResourceGroup", "mySignalRService", "myCert", Context.NONE); + .deleteWithResponse("myResourceGroup", "mySignalRService", "myCert", com.azure.core.util.Context.NONE); } } ``` @@ -575,12 +569,10 @@ public final class SignalRCustomCertificatesDeleteSamples { ### SignalRCustomCertificates_Get ```java -import com.azure.core.util.Context; - /** Samples for SignalRCustomCertificates Get. */ public final class SignalRCustomCertificatesGetSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomCertificates_Get.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomCertificates_Get.json */ /** * Sample code: SignalRCustomCertificates_Get. @@ -590,7 +582,7 @@ public final class SignalRCustomCertificatesGetSamples { public static void signalRCustomCertificatesGet(com.azure.resourcemanager.signalr.SignalRManager manager) { manager .signalRCustomCertificates() - .getWithResponse("myResourceGroup", "mySignalRService", "myCert", Context.NONE); + .getWithResponse("myResourceGroup", "mySignalRService", "myCert", com.azure.core.util.Context.NONE); } } ``` @@ -598,12 +590,10 @@ public final class SignalRCustomCertificatesGetSamples { ### SignalRCustomCertificates_List ```java -import com.azure.core.util.Context; - /** Samples for SignalRCustomCertificates List. */ public final class SignalRCustomCertificatesListSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomCertificates_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomCertificates_List.json */ /** * Sample code: SignalRCustomCertificates_List. @@ -611,7 +601,9 @@ public final class SignalRCustomCertificatesListSamples { * @param manager Entry point to SignalRManager. */ public static void signalRCustomCertificatesList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRCustomCertificates().list("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRCustomCertificates() + .list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -624,7 +616,7 @@ import com.azure.resourcemanager.signalr.models.ResourceReference; /** Samples for SignalRCustomDomains CreateOrUpdate. */ public final class SignalRCustomDomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomDomains_CreateOrUpdate.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomDomains_CreateOrUpdate.json */ /** * Sample code: SignalRCustomDomains_CreateOrUpdate. @@ -649,12 +641,10 @@ public final class SignalRCustomDomainsCreateOrUpdateSamples { ### SignalRCustomDomains_Delete ```java -import com.azure.core.util.Context; - /** Samples for SignalRCustomDomains Delete. */ public final class SignalRCustomDomainsDeleteSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomDomains_Delete.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomDomains_Delete.json */ /** * Sample code: SignalRCustomDomains_Delete. @@ -662,7 +652,9 @@ public final class SignalRCustomDomainsDeleteSamples { * @param manager Entry point to SignalRManager. */ public static void signalRCustomDomainsDelete(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRCustomDomains().delete("myResourceGroup", "mySignalRService", "example", Context.NONE); + manager + .signalRCustomDomains() + .delete("myResourceGroup", "mySignalRService", "example", com.azure.core.util.Context.NONE); } } ``` @@ -670,12 +662,10 @@ public final class SignalRCustomDomainsDeleteSamples { ### SignalRCustomDomains_Get ```java -import com.azure.core.util.Context; - /** Samples for SignalRCustomDomains Get. */ public final class SignalRCustomDomainsGetSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomDomains_Get.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomDomains_Get.json */ /** * Sample code: SignalRCustomDomains_Get. @@ -683,7 +673,9 @@ public final class SignalRCustomDomainsGetSamples { * @param manager Entry point to SignalRManager. */ public static void signalRCustomDomainsGet(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRCustomDomains().getWithResponse("myResourceGroup", "mySignalRService", "example", Context.NONE); + manager + .signalRCustomDomains() + .getWithResponse("myResourceGroup", "mySignalRService", "example", com.azure.core.util.Context.NONE); } } ``` @@ -691,12 +683,10 @@ public final class SignalRCustomDomainsGetSamples { ### SignalRCustomDomains_List ```java -import com.azure.core.util.Context; - /** Samples for SignalRCustomDomains List. */ public final class SignalRCustomDomainsListSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRCustomDomains_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRCustomDomains_List.json */ /** * Sample code: SignalRCustomDomains_List. @@ -704,7 +694,7 @@ public final class SignalRCustomDomainsListSamples { * @param manager Entry point to SignalRManager. */ public static void signalRCustomDomainsList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRCustomDomains().list("myResourceGroup", "mySignalRService", Context.NONE); + manager.signalRCustomDomains().list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -712,12 +702,10 @@ public final class SignalRCustomDomainsListSamples { ### 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/preview/2022-08-01-preview/examples/SignalRPrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRPrivateEndpointConnections_Delete.json */ /** * Sample code: SignalRPrivateEndpointConnections_Delete. @@ -732,7 +720,7 @@ public final class SignalRPrivateEndpointConnectionsDeleteSamples { "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "mySignalRService", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -740,12 +728,10 @@ public final class SignalRPrivateEndpointConnectionsDeleteSamples { ### 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/preview/2022-08-01-preview/examples/SignalRPrivateEndpointConnections_Get.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRPrivateEndpointConnections_Get.json */ /** * Sample code: SignalRPrivateEndpointConnections_Get. @@ -759,7 +745,7 @@ public final class SignalRPrivateEndpointConnectionsGetSamples { "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "myResourceGroup", "mySignalRService", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -767,12 +753,10 @@ public final class SignalRPrivateEndpointConnectionsGetSamples { ### 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/preview/2022-08-01-preview/examples/SignalRPrivateEndpointConnections_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRPrivateEndpointConnections_List.json */ /** * Sample code: SignalRPrivateEndpointConnections_List. @@ -780,7 +764,9 @@ public final class SignalRPrivateEndpointConnectionsListSamples { * @param manager Entry point to SignalRManager. */ public static void signalRPrivateEndpointConnectionsList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRPrivateEndpointConnections().list("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRPrivateEndpointConnections() + .list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -788,7 +774,6 @@ public final class SignalRPrivateEndpointConnectionsListSamples { ### 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; @@ -797,7 +782,7 @@ import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionStat /** Samples for SignalRPrivateEndpointConnections Update. */ public final class SignalRPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRPrivateEndpointConnections_Update.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRPrivateEndpointConnections_Update.json */ /** * Sample code: SignalRPrivateEndpointConnections_Update. @@ -813,15 +798,12 @@ public final class SignalRPrivateEndpointConnectionsUpdateSamples { "myResourceGroup", "mySignalRService", new PrivateEndpointConnectionInner() - .withPrivateEndpoint( - new PrivateEndpoint() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint")) + .withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState() .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) .withActionsRequired("None")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -829,12 +811,10 @@ public final class SignalRPrivateEndpointConnectionsUpdateSamples { ### 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/preview/2022-08-01-preview/examples/SignalRPrivateLinkResources_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRPrivateLinkResources_List.json */ /** * Sample code: SignalRPrivateLinkResources_List. @@ -842,7 +822,182 @@ public final class SignalRPrivateLinkResourcesListSamples { * @param manager Entry point to SignalRManager. */ public static void signalRPrivateLinkResourcesList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRPrivateLinkResources() + .list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); + } +} +``` + +### SignalRReplicas_CreateOrUpdate + +```java +import com.azure.resourcemanager.signalr.models.ResourceSku; +import com.azure.resourcemanager.signalr.models.SignalRSkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SignalRReplicas CreateOrUpdate. */ +public final class SignalRReplicasCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_CreateOrUpdate.json + */ + /** + * Sample code: SignalRReplicas_CreateOrUpdate. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasCreateOrUpdate(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRReplicas() + .define("mySignalRService-eastus") + .withRegion("eastus") + .withExistingSignalR("myResourceGroup", "mySignalRService") + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Premium_P1").withTier(SignalRSkuTier.PREMIUM).withCapacity(1)) + .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; + } +} +``` + +### SignalRReplicas_Delete + +```java +/** Samples for SignalRReplicas Delete. */ +public final class SignalRReplicasDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Delete.json + */ + /** + * Sample code: SignalRReplicas_Delete. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasDelete(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRReplicas() + .deleteWithResponse( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### SignalRReplicas_Get + +```java +/** Samples for SignalRReplicas Get. */ +public final class SignalRReplicasGetSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Get.json + */ + /** + * Sample code: SignalRReplicas_Get. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRReplicas() + .getWithResponse( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### SignalRReplicas_List + +```java +/** Samples for SignalRReplicas List. */ +public final class SignalRReplicasListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_List.json + */ + /** + * Sample code: SignalRReplicas_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRReplicas().list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); + } +} +``` + +### SignalRReplicas_Restart + +```java +/** Samples for SignalRReplicas Restart. */ +public final class SignalRReplicasRestartSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Restart.json + */ + /** + * Sample code: SignalRReplicas_Restart. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasRestart(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRReplicas() + .restart( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### SignalRReplicas_Update + +```java +import com.azure.resourcemanager.signalr.models.Replica; +import com.azure.resourcemanager.signalr.models.ResourceSku; +import com.azure.resourcemanager.signalr.models.SignalRSkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SignalRReplicas Update. */ +public final class SignalRReplicasUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Update.json + */ + /** + * Sample code: SignalRReplicas_Update. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasUpdate(com.azure.resourcemanager.signalr.SignalRManager manager) { + Replica resource = + manager + .signalRReplicas() + .getWithResponse( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Premium_P1").withTier(SignalRSkuTier.PREMIUM).withCapacity(1)) + .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; } } ``` @@ -853,7 +1008,7 @@ public final class SignalRPrivateLinkResourcesListSamples { /** Samples for SignalRSharedPrivateLinkResources CreateOrUpdate. */ public final class SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: SignalRSharedPrivateLinkResources_CreateOrUpdate. @@ -878,12 +1033,10 @@ public final class SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples { ### 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/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_Delete.json */ /** * Sample code: SignalRSharedPrivateLinkResources_Delete. @@ -894,7 +1047,7 @@ public final class SignalRSharedPrivateLinkResourcesDeleteSamples { com.azure.resourcemanager.signalr.SignalRManager manager) { manager .signalRSharedPrivateLinkResources() - .delete("upstream", "myResourceGroup", "mySignalRService", Context.NONE); + .delete("upstream", "myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -902,12 +1055,10 @@ public final class SignalRSharedPrivateLinkResourcesDeleteSamples { ### 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/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_Get.json */ /** * Sample code: SignalRSharedPrivateLinkResources_Get. @@ -917,7 +1068,7 @@ public final class SignalRSharedPrivateLinkResourcesGetSamples { public static void signalRSharedPrivateLinkResourcesGet(com.azure.resourcemanager.signalr.SignalRManager manager) { manager .signalRSharedPrivateLinkResources() - .getWithResponse("upstream", "myResourceGroup", "mySignalRService", Context.NONE); + .getWithResponse("upstream", "myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -925,12 +1076,10 @@ public final class SignalRSharedPrivateLinkResourcesGetSamples { ### 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/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_List.json */ /** * Sample code: SignalRSharedPrivateLinkResources_List. @@ -938,7 +1087,9 @@ public final class SignalRSharedPrivateLinkResourcesListSamples { * @param manager Entry point to SignalRManager. */ public static void signalRSharedPrivateLinkResourcesList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRSharedPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRSharedPrivateLinkResources() + .list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } ``` @@ -946,12 +1097,10 @@ public final class SignalRSharedPrivateLinkResourcesListSamples { ### 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/preview/2022-08-01-preview/examples/Usages_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/Usages_List.json */ /** * Sample code: Usages_List. @@ -959,7 +1108,7 @@ public final class UsagesListSamples { * @param manager Entry point to SignalRManager. */ public static void usagesList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.usages().list("eastus", Context.NONE); + manager.usages().list("eastus", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/signalr/azure-resourcemanager-signalr/pom.xml b/sdk/signalr/azure-resourcemanager-signalr/pom.xml index 364ee139f15b..0a41efe95818 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/pom.xml +++ b/sdk/signalr/azure-resourcemanager-signalr/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,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-2022-08-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-2023-03-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 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 8687b1dd50b7..3693d6d2b6ce 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 @@ -30,6 +30,7 @@ import com.azure.resourcemanager.signalr.implementation.SignalRManagementClientBuilder; import com.azure.resourcemanager.signalr.implementation.SignalRPrivateEndpointConnectionsImpl; import com.azure.resourcemanager.signalr.implementation.SignalRPrivateLinkResourcesImpl; +import com.azure.resourcemanager.signalr.implementation.SignalRReplicasImpl; import com.azure.resourcemanager.signalr.implementation.SignalRSharedPrivateLinkResourcesImpl; import com.azure.resourcemanager.signalr.implementation.SignalRsImpl; import com.azure.resourcemanager.signalr.implementation.UsagesImpl; @@ -38,6 +39,7 @@ import com.azure.resourcemanager.signalr.models.SignalRCustomDomains; import com.azure.resourcemanager.signalr.models.SignalRPrivateEndpointConnections; import com.azure.resourcemanager.signalr.models.SignalRPrivateLinkResources; +import com.azure.resourcemanager.signalr.models.SignalRReplicas; import com.azure.resourcemanager.signalr.models.SignalRSharedPrivateLinkResources; import com.azure.resourcemanager.signalr.models.SignalRs; import com.azure.resourcemanager.signalr.models.Usages; @@ -64,6 +66,8 @@ public final class SignalRManager { private SignalRPrivateLinkResources signalRPrivateLinkResources; + private SignalRReplicas signalRReplicas; + private SignalRSharedPrivateLinkResources signalRSharedPrivateLinkResources; private final SignalRManagementClient clientObject; @@ -231,7 +235,7 @@ public SignalRManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.signalr") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -375,6 +379,18 @@ public SignalRPrivateLinkResources signalRPrivateLinkResources() { return signalRPrivateLinkResources; } + /** + * Gets the resource collection API of SignalRReplicas. It manages Replica. + * + * @return Resource collection API of SignalRReplicas. + */ + public SignalRReplicas signalRReplicas() { + if (this.signalRReplicas == null) { + this.signalRReplicas = new SignalRReplicasImpl(clientObject.getSignalRReplicas(), this); + } + return signalRReplicas; + } + /** * Gets the resource collection API of SignalRSharedPrivateLinkResources. It manages SharedPrivateLinkResource. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomCertificatesClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomCertificatesClient.java index b0f0fdff2ec8..e6ce1f38ebab 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomCertificatesClient.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomCertificatesClient.java @@ -18,8 +18,7 @@ public interface SignalRCustomCertificatesClient { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -32,8 +31,7 @@ public interface SignalRCustomCertificatesClient { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,8 +45,7 @@ public interface SignalRCustomCertificatesClient { /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -64,8 +61,7 @@ Response getWithResponse( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,8 +75,7 @@ Response getWithResponse( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -96,8 +91,7 @@ SyncPoller, CustomCertificateInner> beginCrea /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -118,8 +112,7 @@ SyncPoller, CustomCertificateInner> beginCrea /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -135,8 +128,7 @@ CustomCertificateInner createOrUpdate( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -157,8 +149,7 @@ CustomCertificateInner createOrUpdate( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -174,8 +165,7 @@ Response deleteWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomDomainsClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomDomainsClient.java index beb788760f70..3c55fb7f05dd 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomDomainsClient.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRCustomDomainsClient.java @@ -18,8 +18,7 @@ public interface SignalRCustomDomainsClient { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -32,8 +31,7 @@ public interface SignalRCustomDomainsClient { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,8 +45,7 @@ public interface SignalRCustomDomainsClient { /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -64,8 +61,7 @@ Response getWithResponse( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,8 +75,7 @@ Response getWithResponse( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -96,8 +91,7 @@ SyncPoller, CustomDomainInner> beginCreateOrUpdate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -114,8 +108,7 @@ SyncPoller, CustomDomainInner> beginCreateOrUpdate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -131,8 +124,7 @@ CustomDomainInner createOrUpdate( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -149,8 +141,7 @@ CustomDomainInner createOrUpdate( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,8 +155,7 @@ CustomDomainInner createOrUpdate( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -181,8 +171,7 @@ SyncPoller, Void> beginDelete( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,8 +184,7 @@ SyncPoller, Void> beginDelete( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRManagementClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRManagementClient.java index 2000fcc6df6b..faa9060e3bf6 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRManagementClient.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRManagementClient.java @@ -10,8 +10,7 @@ /** The interface for SignalRManagementClient class. */ public interface SignalRManagementClient { /** - * Gets Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -94,6 +93,13 @@ public interface SignalRManagementClient { */ SignalRPrivateLinkResourcesClient getSignalRPrivateLinkResources(); + /** + * Gets the SignalRReplicasClient object to access its operations. + * + * @return the SignalRReplicasClient object. + */ + SignalRReplicasClient getSignalRReplicas(); + /** * Gets the SignalRSharedPrivateLinkResourcesClient object to access its operations. * 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 c946055af5e7..c0d48b62cf87 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 @@ -20,8 +20,7 @@ public interface SignalRPrivateEndpointConnectionsClient { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -34,8 +33,7 @@ public interface SignalRPrivateEndpointConnectionsClient { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,9 +47,9 @@ public interface SignalRPrivateEndpointConnectionsClient { /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,9 +64,9 @@ Response getWithResponse( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -82,9 +80,9 @@ PrivateEndpointConnectionInner get( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -104,9 +102,9 @@ Response updateWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,9 +122,9 @@ PrivateEndpointConnectionInner update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -140,9 +138,9 @@ SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,9 +155,9 @@ SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -171,9 +169,9 @@ SyncPoller, Void> beginDelete( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateLinkResourcesClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateLinkResourcesClient.java index cf37f7046317..5720aed2289a 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateLinkResourcesClient.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRPrivateLinkResourcesClient.java @@ -15,8 +15,7 @@ public interface SignalRPrivateLinkResourcesClient { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -30,8 +29,7 @@ public interface SignalRPrivateLinkResourcesClient { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRReplicasClient.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRReplicasClient.java new file mode 100644 index 000000000000..c5e89dac3f94 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRReplicasClient.java @@ -0,0 +1,291 @@ +// 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; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.signalr.fluent.models.ReplicaInner; + +/** An instance of this class provides access to all the operations defined in SignalRReplicasClient. */ +public interface SignalRReplicasClient { + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner get(String resourceGroupName, String resourceName, String replicaName); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update 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 a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @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 a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update 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 a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner update(String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters); + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @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 a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReplicaInner update( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestart( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restart(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restart(String resourceGroupName, String resourceName, String replicaName, 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 3d079df6ec35..c11bae9e0a0b 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 @@ -20,8 +20,7 @@ public interface SignalRSharedPrivateLinkResourcesClient { /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -34,8 +33,7 @@ public interface SignalRSharedPrivateLinkResourcesClient { /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,8 +48,7 @@ public interface SignalRSharedPrivateLinkResourcesClient { * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,8 +64,7 @@ Response getWithResponse( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -83,8 +79,7 @@ SharedPrivateLinkResourceInner get( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,8 +98,7 @@ SyncPoller, SharedPrivateLinkResource * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -125,8 +119,7 @@ SyncPoller, SharedPrivateLinkResource * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -145,8 +138,7 @@ SharedPrivateLinkResourceInner createOrUpdate( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -167,8 +159,7 @@ SharedPrivateLinkResourceInner createOrUpdate( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -183,8 +174,7 @@ SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -200,8 +190,7 @@ SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -214,8 +203,7 @@ SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 ce0e6b669839..7d9045a17fa3 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 @@ -75,8 +75,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -89,8 +88,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -104,8 +102,7 @@ Response checkNameAvailabilityWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -120,8 +117,7 @@ Response getByResourceGroupWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -134,8 +130,7 @@ Response getByResourceGroupWithResponse( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,8 +145,7 @@ SyncPoller, SignalRResourceInner> beginCreateOr /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -167,8 +161,7 @@ SyncPoller, SignalRResourceInner> beginCreateOr /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,8 +175,7 @@ SyncPoller, SignalRResourceInner> beginCreateOr /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -199,8 +191,7 @@ SignalRResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -213,8 +204,7 @@ SignalRResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -228,8 +218,7 @@ SignalRResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -241,8 +230,7 @@ SignalRResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,8 +243,7 @@ SignalRResourceInner createOrUpdate( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,8 +258,7 @@ SyncPoller, SignalRResourceInner> beginUpdate( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -288,8 +274,7 @@ SyncPoller, SignalRResourceInner> beginUpdate( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -303,8 +288,7 @@ SyncPoller, SignalRResourceInner> beginUpdate( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -320,8 +304,7 @@ SignalRResourceInner update( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,8 +318,7 @@ SignalRResourceInner update( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -349,8 +331,7 @@ SignalRResourceInner update( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -365,8 +346,7 @@ SyncPoller, SignalRKeysInner> beginRegenerateKey( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -382,8 +362,7 @@ SyncPoller, SignalRKeysInner> beginRegenerateKey( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -397,8 +376,7 @@ SyncPoller, SignalRKeysInner> beginRegenerateKey( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -414,8 +392,7 @@ SignalRKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -428,8 +405,7 @@ SignalRKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -443,8 +419,7 @@ SignalRKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -456,8 +431,7 @@ SignalRKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -470,8 +444,7 @@ SignalRKeysInner regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -485,8 +458,7 @@ SignalRKeysInner regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomCertificateInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomCertificateInner.java index 1100397c6590..40f8858b99e4 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomCertificateInner.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomCertificateInner.java @@ -14,38 +14,38 @@ /** A custom certificate. */ @Fluent public final class CustomCertificateInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Custom certificate properties. */ @JsonProperty(value = "properties", required = true) private CustomCertificateProperties innerProperties = new CustomCertificateProperties(); + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of CustomCertificateInner class. */ public CustomCertificateInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Custom certificate properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private CustomCertificateProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Custom certificate properties. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private CustomCertificateProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomDomainInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomDomainInner.java index 18489b6ede61..d93a40b22459 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomDomainInner.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/CustomDomainInner.java @@ -15,38 +15,38 @@ /** A custom domain. */ @Fluent public final class CustomDomainInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Properties of a custom domain. */ @JsonProperty(value = "properties", required = true) private CustomDomainProperties innerProperties = new CustomDomainProperties(); + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of CustomDomainInner class. */ public CustomDomainInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Properties of a custom domain. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private CustomDomainProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Properties of a custom domain. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private CustomDomainProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** 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 1e98cb6ee9d8..b3396e23b47b 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 @@ -16,38 +16,38 @@ /** A private endpoint connection to an azure resource. */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Private endpoint connection properties */ @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of PrivateEndpointConnectionInner class. */ public PrivateEndpointConnectionInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Private endpoint connection properties. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Private endpoint connection properties. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** 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 ceb8a1509ea3..b6dc4447bac3 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 @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -19,6 +20,12 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "properties") private PrivateLinkResourceProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of PrivateLinkResourceInner class. */ public PrivateLinkResourceInner() { } @@ -32,6 +39,15 @@ private PrivateLinkResourceProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the groupId property: Group Id of the private link resource. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaInner.java new file mode 100644 index 000000000000..b1a34640fe69 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaInner.java @@ -0,0 +1,114 @@ +// 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.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.signalr.models.ProvisioningState; +import com.azure.resourcemanager.signalr.models.ResourceSku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A class represent a replica resource. */ +@Fluent +public final class ReplicaInner extends Resource { + /* + * The billing information of the resource. + */ + @JsonProperty(value = "sku") + private ResourceSku sku; + + /* + * The properties property. + */ + @JsonProperty(value = "properties") + private ReplicaProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ReplicaInner class. */ + public ReplicaInner() { + } + + /** + * Get the sku property: The billing information of the resource. + * + * @return the sku value. + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Set the sku property: The billing information of the resource. + * + * @param sku the sku value to set. + * @return the ReplicaInner object itself. + */ + public ReplicaInner withSku(ResourceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the innerProperties property: The properties property. + * + * @return the innerProperties value. + */ + private ReplicaProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ReplicaInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ReplicaInner 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.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaProperties.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaProperties.java new file mode 100644 index 000000000000..ec8404e44968 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/ReplicaProperties.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.signalr.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ReplicaProperties model. */ +@Immutable +public final class ReplicaProperties { + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of ReplicaProperties class. */ + public ReplicaProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * 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/fluent/models/SharedPrivateLinkResourceInner.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/SharedPrivateLinkResourceInner.java index 860a5d370141..5a7cb45b3faf 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 @@ -14,38 +14,38 @@ /** Describes a Shared Private Link Resource. */ @Fluent public final class SharedPrivateLinkResourceInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Describes the properties of an existing Shared Private Link Resource */ @JsonProperty(value = "properties") private SharedPrivateLinkResourceProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of SharedPrivateLinkResourceInner class. */ public SharedPrivateLinkResourceInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the innerProperties property: Describes the properties of an existing Shared Private Link Resource. * - * @return the systemData value. + * @return the innerProperties value. */ - public SystemData systemData() { - return this.systemData; + private SharedPrivateLinkResourceProperties innerProperties() { + return this.innerProperties; } /** - * Get the innerProperties property: Describes the properties of an existing Shared Private Link Resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the innerProperties value. + * @return the systemData value. */ - private SharedPrivateLinkResourceProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** 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 e3f82f1fd4e0..e0a7cc42e3de 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 @@ -51,7 +51,7 @@ public final class SignalRResourceInner extends Resource { private ManagedIdentity identity; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -130,7 +130,7 @@ public SignalRResourceInner withIdentity(ManagedIdentity identity) { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateLinkResourceImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateLinkResourceImpl.java index 4c74979de2a2..fa4d9d2bed98 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateLinkResourceImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/PrivateLinkResourceImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.signalr.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.signalr.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.signalr.models.PrivateLinkResource; import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType; @@ -33,6 +34,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String groupId() { return this.innerModel().groupId(); } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/ReplicaImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/ReplicaImpl.java new file mode 100644 index 000000000000..6b0d8bd8a79b --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/ReplicaImpl.java @@ -0,0 +1,192 @@ +// 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.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.signalr.fluent.models.ReplicaInner; +import com.azure.resourcemanager.signalr.models.ProvisioningState; +import com.azure.resourcemanager.signalr.models.Replica; +import com.azure.resourcemanager.signalr.models.ResourceSku; +import java.util.Collections; +import java.util.Map; + +public final class ReplicaImpl implements Replica, Replica.Definition, Replica.Update { + private ReplicaInner innerObject; + + private final com.azure.resourcemanager.signalr.SignalRManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ResourceSku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ReplicaInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.signalr.SignalRManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String replicaName; + + public ReplicaImpl withExistingSignalR(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public Replica create() { + this.innerObject = + serviceManager + .serviceClient() + .getSignalRReplicas() + .createOrUpdate(resourceGroupName, resourceName, replicaName, this.innerModel(), Context.NONE); + return this; + } + + public Replica create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSignalRReplicas() + .createOrUpdate(resourceGroupName, resourceName, replicaName, this.innerModel(), context); + return this; + } + + ReplicaImpl(String name, com.azure.resourcemanager.signalr.SignalRManager serviceManager) { + this.innerObject = new ReplicaInner(); + this.serviceManager = serviceManager; + this.replicaName = name; + } + + public ReplicaImpl update() { + return this; + } + + public Replica apply() { + this.innerObject = + serviceManager + .serviceClient() + .getSignalRReplicas() + .update(resourceGroupName, resourceName, replicaName, this.innerModel(), Context.NONE); + return this; + } + + public Replica apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSignalRReplicas() + .update(resourceGroupName, resourceName, replicaName, this.innerModel(), context); + return this; + } + + ReplicaImpl(ReplicaInner innerObject, com.azure.resourcemanager.signalr.SignalRManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "signalR"); + this.replicaName = Utils.getValueFromIdByName(innerObject.id(), "replicas"); + } + + public Replica refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getSignalRReplicas() + .getWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE) + .getValue(); + return this; + } + + public Replica refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getSignalRReplicas() + .getWithResponse(resourceGroupName, resourceName, replicaName, context) + .getValue(); + return this; + } + + public void restart() { + serviceManager.signalRReplicas().restart(resourceGroupName, resourceName, replicaName); + } + + public void restart(Context context) { + serviceManager.signalRReplicas().restart(resourceGroupName, resourceName, replicaName, context); + } + + public ReplicaImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ReplicaImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ReplicaImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public ReplicaImpl withSku(ResourceSku sku) { + this.innerModel().withSku(sku); + return this; + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomCertificatesClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomCertificatesClientImpl.java index e2dcb6e2ec66..9a55a6feaf61 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomCertificatesClientImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomCertificatesClientImpl.java @@ -68,8 +68,7 @@ public final class SignalRCustomCertificatesClientImpl implements SignalRCustomC public interface SignalRCustomCertificatesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customCertificates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customCertificates") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -83,8 +82,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customCertificates/{certificateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customCertificates/{certificateName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,8 +97,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customCertificates/{certificateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customCertificates/{certificateName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -116,8 +113,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customCertificates/{certificateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customCertificates/{certificateName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -144,8 +140,7 @@ Mono> listNext( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -202,8 +197,7 @@ private Mono> listSinglePageAsync( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -258,8 +252,7 @@ private Mono> listSinglePageAsync( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -275,8 +268,7 @@ private PagedFlux listAsync(String resourceGroupName, St /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -295,8 +287,7 @@ private PagedFlux listAsync( /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -311,8 +302,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -328,8 +318,7 @@ public PagedIterable list(String resourceGroupName, Stri /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -383,8 +372,7 @@ private Mono> getWithResponseAsync( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -436,8 +424,7 @@ private Mono> getWithResponseAsync( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -455,8 +442,7 @@ private Mono getAsync( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -474,8 +460,7 @@ public Response getWithResponse( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -491,8 +476,7 @@ public CustomCertificateInner get(String resourceGroupName, String resourceName, /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -553,8 +537,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -617,8 +600,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -645,8 +627,7 @@ private PollerFlux, CustomCertificateInner> b /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -679,8 +660,7 @@ private PollerFlux, CustomCertificateInner> b /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -692,14 +672,15 @@ private PollerFlux, CustomCertificateInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomCertificateInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters) + .getSyncPoller(); } /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -716,15 +697,15 @@ public SyncPoller, CustomCertificateInner> be String certificateName, CustomCertificateInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context) .getSyncPoller(); } /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -744,8 +725,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -770,8 +750,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -789,8 +768,7 @@ public CustomCertificateInner createOrUpdate( /** * Create or update a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param parameters A custom certificate. @@ -813,8 +791,7 @@ public CustomCertificateInner createOrUpdate( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -868,8 +845,7 @@ private Mono> deleteWithResponseAsync( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -921,8 +897,7 @@ private Mono> deleteWithResponseAsync( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -939,8 +914,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -958,8 +932,7 @@ public Response deleteWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomDomainsClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomDomainsClientImpl.java index 3115abdfb2ba..379d7d29547d 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomDomainsClientImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRCustomDomainsClientImpl.java @@ -67,8 +67,7 @@ public final class SignalRCustomDomainsClientImpl implements SignalRCustomDomain public interface SignalRCustomDomainsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customDomains") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customDomains") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -82,8 +81,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customDomains/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customDomains/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -98,8 +96,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customDomains/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customDomains/{name}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -115,8 +112,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/customDomains/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/customDomains/{name}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -143,8 +139,7 @@ Mono> listNext( /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -200,8 +195,7 @@ private Mono> listSinglePageAsync(String resour /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -256,8 +250,7 @@ private Mono> listSinglePageAsync( /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -273,8 +266,7 @@ private PagedFlux listAsync(String resourceGroupName, String /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -292,8 +284,7 @@ private PagedFlux listAsync(String resourceGroupName, String /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -308,8 +299,7 @@ public PagedIterable list(String resourceGroupName, String re /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -325,8 +315,7 @@ public PagedIterable list(String resourceGroupName, String re /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -379,8 +368,7 @@ private Mono> getWithResponseAsync( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -431,8 +419,7 @@ private Mono> getWithResponseAsync( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -449,8 +436,7 @@ private Mono getAsync(String resourceGroupName, String resour /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -468,8 +454,7 @@ public Response getWithResponse( /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -485,8 +470,7 @@ public CustomDomainInner get(String resourceGroupName, String resourceName, Stri /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -546,8 +530,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -605,8 +588,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -633,8 +615,7 @@ private PollerFlux, CustomDomainInner> beginCreate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -659,8 +640,7 @@ private PollerFlux, CustomDomainInner> beginCreate /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -672,14 +652,13 @@ private PollerFlux, CustomDomainInner> beginCreate @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomDomainInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, String name, CustomDomainInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters).getSyncPoller(); } /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -692,14 +671,15 @@ public SyncPoller, CustomDomainInner> beginCreateO @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CustomDomainInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context) + .getSyncPoller(); } /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -719,8 +699,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -741,8 +720,7 @@ private Mono createOrUpdateAsync( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -760,8 +738,7 @@ public CustomDomainInner createOrUpdate( /** * Create or update a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param parameters A custom domain. @@ -780,8 +757,7 @@ public CustomDomainInner createOrUpdate( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -834,8 +810,7 @@ private Mono>> deleteWithResponseAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -886,8 +861,7 @@ private Mono>> deleteWithResponseAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -908,8 +882,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -931,8 +904,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -942,14 +914,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String name) { - return beginDeleteAsync(resourceGroupName, resourceName, name).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, resourceName, name).getSyncPoller(); } /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -961,14 +932,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String resourceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, name, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, resourceName, name, context).getSyncPoller(); } /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -986,8 +956,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -1006,8 +975,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1022,8 +990,7 @@ public void delete(String resourceGroupName, String resourceName, String name) { /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientBuilder.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientBuilder.java index 103877513c87..31c9e724c4b9 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientBuilder.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRManagementClientBuilder.java @@ -18,14 +18,12 @@ @ServiceClientBuilder(serviceClients = {SignalRManagementClientImpl.class}) public final class SignalRManagementClientBuilder { /* - * Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of - * the URI for every service call. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. * @return the SignalRManagementClientBuilder. 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 ab7c5f57850a..0d676798628a 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 @@ -28,6 +28,7 @@ import com.azure.resourcemanager.signalr.fluent.SignalRManagementClient; import com.azure.resourcemanager.signalr.fluent.SignalRPrivateEndpointConnectionsClient; import com.azure.resourcemanager.signalr.fluent.SignalRPrivateLinkResourcesClient; +import com.azure.resourcemanager.signalr.fluent.SignalRReplicasClient; import com.azure.resourcemanager.signalr.fluent.SignalRSharedPrivateLinkResourcesClient; import com.azure.resourcemanager.signalr.fluent.SignalRsClient; import com.azure.resourcemanager.signalr.fluent.UsagesClient; @@ -43,15 +44,11 @@ /** Initializes a new instance of the SignalRManagementClientImpl type. */ @ServiceClient(builder = SignalRManagementClientBuilder.class) public final class SignalRManagementClientImpl implements SignalRManagementClient { - /** - * Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of - * the URI for every service call. - */ + /** The ID of the target subscription. The value must be an UUID. */ private final String subscriptionId; /** - * Gets Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms - * part of the URI for every service call. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -203,6 +200,18 @@ public SignalRPrivateLinkResourcesClient getSignalRPrivateLinkResources() { return this.signalRPrivateLinkResources; } + /** The SignalRReplicasClient object to access its operations. */ + private final SignalRReplicasClient signalRReplicas; + + /** + * Gets the SignalRReplicasClient object to access its operations. + * + * @return the SignalRReplicasClient object. + */ + public SignalRReplicasClient getSignalRReplicas() { + return this.signalRReplicas; + } + /** The SignalRSharedPrivateLinkResourcesClient object to access its operations. */ private final SignalRSharedPrivateLinkResourcesClient signalRSharedPrivateLinkResources; @@ -222,8 +231,7 @@ public SignalRSharedPrivateLinkResourcesClient getSignalRSharedPrivateLinkResour * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId Gets subscription Id which uniquely identify the Microsoft Azure subscription. The - * subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ SignalRManagementClientImpl( @@ -238,7 +246,7 @@ public SignalRSharedPrivateLinkResourcesClient getSignalRSharedPrivateLinkResour this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-08-01-preview"; + this.apiVersion = "2023-03-01-preview"; this.operations = new OperationsClientImpl(this); this.signalRs = new SignalRsClientImpl(this); this.usages = new UsagesClientImpl(this); @@ -246,6 +254,7 @@ public SignalRSharedPrivateLinkResourcesClient getSignalRSharedPrivateLinkResour this.signalRCustomDomains = new SignalRCustomDomainsClientImpl(this); this.signalRPrivateEndpointConnections = new SignalRPrivateEndpointConnectionsClientImpl(this); this.signalRPrivateLinkResources = new SignalRPrivateLinkResourcesClientImpl(this); + this.signalRReplicas = new SignalRReplicasClientImpl(this); this.signalRSharedPrivateLinkResources = new SignalRSharedPrivateLinkResourcesClientImpl(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 8bb83028be66..aba9cb7cd87b 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 @@ -72,8 +72,7 @@ public final class SignalRPrivateEndpointConnectionsClientImpl implements Signal public interface SignalRPrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/privateEndpointConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -87,8 +86,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -103,8 +101,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -120,8 +117,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -148,8 +144,7 @@ Mono> listNext( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -207,8 +202,7 @@ private Mono> listSinglePageAsync( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,8 +258,7 @@ private Mono> listSinglePageAsync( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -281,8 +274,7 @@ private PagedFlux listAsync(String resourceGroup /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -301,8 +293,7 @@ private PagedFlux listAsync( /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -317,8 +308,7 @@ public PagedIterable list(String resourceGroupNa /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -335,9 +325,9 @@ public PagedIterable list( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -393,9 +383,9 @@ private Mono> getWithResponseAsync( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -449,9 +439,9 @@ private Mono> getWithResponseAsync( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -468,9 +458,9 @@ private Mono getAsync( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,9 +477,9 @@ public Response getWithResponse( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -505,9 +495,9 @@ public PrivateEndpointConnectionInner get( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -573,9 +563,9 @@ private Mono> updateWithResponseAsync( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -640,9 +630,9 @@ private Mono> updateWithResponseAsync( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -663,9 +653,9 @@ private Mono updateAsync( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -689,9 +679,9 @@ public Response updateWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -713,9 +703,9 @@ public PrivateEndpointConnectionInner update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -770,9 +760,9 @@ private Mono>> deleteWithResponseAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -825,9 +815,9 @@ private Mono>> deleteWithResponseAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -848,9 +838,9 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -872,9 +862,9 @@ private PollerFlux, Void> beginDeleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -884,15 +874,15 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String privateEndpointConnectionName, String resourceGroupName, String resourceName) { - return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName).getSyncPoller(); + return this.beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName).getSyncPoller(); } /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -903,16 +893,17 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context) + return this + .beginDeleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context) .getSyncPoller(); } /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -930,9 +921,9 @@ private Mono deleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -951,9 +942,9 @@ private Mono deleteAsync( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -967,9 +958,9 @@ public void delete(String privateEndpointConnectionName, String resourceGroupNam /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateLinkResourcesClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateLinkResourcesClientImpl.java index ec1db751a968..fb387f2e2603 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateLinkResourcesClientImpl.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRPrivateLinkResourcesClientImpl.java @@ -60,8 +60,7 @@ public final class SignalRPrivateLinkResourcesClientImpl implements SignalRPriva public interface SignalRPrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -87,8 +86,7 @@ Mono> listNext( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -146,8 +144,7 @@ private Mono> listSinglePageAsync( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -203,8 +200,7 @@ private Mono> listSinglePageAsync( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -221,8 +217,7 @@ private PagedFlux listAsync(String resourceGroupName, /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -242,8 +237,7 @@ private PagedFlux listAsync( /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -259,8 +253,7 @@ public PagedIterable list(String resourceGroupName, St /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasClientImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasClientImpl.java new file mode 100644 index 000000000000..3b4c75c56599 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasClientImpl.java @@ -0,0 +1,1547 @@ +// 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.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.signalr.fluent.SignalRReplicasClient; +import com.azure.resourcemanager.signalr.fluent.models.ReplicaInner; +import com.azure.resourcemanager.signalr.models.ReplicaList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in SignalRReplicasClient. */ +public final class SignalRReplicasClientImpl implements SignalRReplicasClient { + /** The proxy service used to perform REST calls. */ + private final SignalRReplicasService service; + + /** The service client containing this operation class. */ + private final SignalRManagementClientImpl client; + + /** + * Initializes an instance of SignalRReplicasClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SignalRReplicasClientImpl(SignalRManagementClientImpl client) { + this.service = + RestProxy.create(SignalRReplicasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SignalRManagementClientSignalRReplicas to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SignalRManagementCli") + public interface SignalRReplicasService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/replicas") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ReplicaInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/replicas/{replicaName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ReplicaInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/replicas/{replicaName}/restart") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restart( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @PathParam("replicaName") String replicaName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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 + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + 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 + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, resourceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 replica and its properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 replica and its properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, String replicaName) { + return getWithResponseAsync(resourceGroupName, resourceName, replicaName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, replicaName, context).block(); + } + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 replica and its properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner get(String resourceGroupName, String resourceName, String replicaName) { + return getWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE).getValue(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, this.client.getContext()); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, context); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters).getSyncPoller(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context) + .getSyncPoller(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters).block(); + } + + /** + * Create or update a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the create or update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner createOrUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context).block(); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String replicaName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, replicaName).flatMap(ignored -> Mono.empty()); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, replicaName, context).block(); + } + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String replicaName) { + deleteWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, this.client.getContext()); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReplicaInner> beginUpdateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, resourceName, replicaName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ReplicaInner.class, ReplicaInner.class, context); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return this.beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters).getSyncPoller(); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReplicaInner> beginUpdate( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context).getSyncPoller(); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return beginUpdateAsync(resourceGroupName, resourceName, replicaName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner update( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters) { + return updateAsync(resourceGroupName, resourceName, replicaName, parameters).block(); + } + + /** + * Operation to update an exiting replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param parameters Parameters for the update operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a class represent a replica resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReplicaInner update( + String resourceGroupName, String resourceName, String replicaName, ReplicaInner parameters, Context context) { + return updateAsync(resourceGroupName, resourceName, replicaName, parameters, context).block(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restartWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName) { + 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restart( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restartWithResponseAsync( + String resourceGroupName, String resourceName, String replicaName, 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.")); + } + if (replicaName == null) { + return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restart( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + replicaName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestartAsync( + String resourceGroupName, String resourceName, String replicaName) { + Mono>> mono = restartWithResponseAsync(resourceGroupName, resourceName, replicaName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestartAsync( + String resourceGroupName, String resourceName, String replicaName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restartWithResponseAsync(resourceGroupName, resourceName, replicaName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestart( + String resourceGroupName, String resourceName, String replicaName) { + return this.beginRestartAsync(resourceGroupName, resourceName, replicaName).getSyncPoller(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestart( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return this.beginRestartAsync(resourceGroupName, resourceName, replicaName, context).getSyncPoller(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartAsync(String resourceGroupName, String resourceName, String replicaName) { + return beginRestartAsync(resourceGroupName, resourceName, replicaName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartAsync( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return beginRestartAsync(resourceGroupName, resourceName, replicaName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restart(String resourceGroupName, String resourceName, String replicaName) { + restartAsync(resourceGroupName, resourceName, replicaName).block(); + } + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restart(String resourceGroupName, String resourceName, String replicaName, Context context) { + restartAsync(resourceGroupName, resourceName, replicaName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasImpl.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasImpl.java new file mode 100644 index 000000000000..d67130303805 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/implementation/SignalRReplicasImpl.java @@ -0,0 +1,196 @@ +// 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.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.signalr.fluent.SignalRReplicasClient; +import com.azure.resourcemanager.signalr.fluent.models.ReplicaInner; +import com.azure.resourcemanager.signalr.models.Replica; +import com.azure.resourcemanager.signalr.models.SignalRReplicas; + +public final class SignalRReplicasImpl implements SignalRReplicas { + private static final ClientLogger LOGGER = new ClientLogger(SignalRReplicasImpl.class); + + private final SignalRReplicasClient innerClient; + + private final com.azure.resourcemanager.signalr.SignalRManager serviceManager; + + public SignalRReplicasImpl( + SignalRReplicasClient innerClient, com.azure.resourcemanager.signalr.SignalRManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName); + return Utils.mapPage(inner, inner1 -> new ReplicaImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, resourceName, context); + return Utils.mapPage(inner, inner1 -> new ReplicaImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, resourceName, replicaName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ReplicaImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Replica get(String resourceGroupName, String resourceName, String replicaName) { + ReplicaInner inner = this.serviceClient().get(resourceGroupName, resourceName, replicaName); + if (inner != null) { + return new ReplicaImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, replicaName, context); + } + + public void delete(String resourceGroupName, String resourceName, String replicaName) { + this.serviceClient().delete(resourceGroupName, resourceName, replicaName); + } + + public void restart(String resourceGroupName, String resourceName, String replicaName) { + this.serviceClient().restart(resourceGroupName, resourceName, replicaName); + } + + public void restart(String resourceGroupName, String resourceName, String replicaName, Context context) { + this.serviceClient().restart(resourceGroupName, resourceName, replicaName, context); + } + + public Replica getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "signalR"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'signalR'.", id))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "signalR"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'signalR'.", id))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, replicaName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "signalR"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'signalR'.", id))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + this.deleteWithResponse(resourceGroupName, resourceName, replicaName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "signalR"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'signalR'.", id))); + } + String replicaName = Utils.getValueFromIdByName(id, "replicas"); + if (replicaName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'replicas'.", id))); + } + return this.deleteWithResponse(resourceGroupName, resourceName, replicaName, context); + } + + private SignalRReplicasClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.signalr.SignalRManager manager() { + return this.serviceManager; + } + + public ReplicaImpl define(String name) { + return new ReplicaImpl(name, this.manager()); + } +} 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 7ca5e0b93aad..01dda9936c60 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 @@ -72,8 +72,7 @@ public final class SignalRSharedPrivateLinkResourcesClientImpl implements Signal public interface SignalRSharedPrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/sharedPrivateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -87,8 +86,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -103,8 +101,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -120,8 +117,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -148,8 +144,7 @@ Mono> listNext( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -207,8 +202,7 @@ private Mono> listSinglePageAsync( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,8 +258,7 @@ private Mono> listSinglePageAsync( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -281,8 +274,7 @@ private PagedFlux listAsync(String resourceGroup /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -301,8 +293,7 @@ private PagedFlux listAsync( /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -317,8 +308,7 @@ public PagedIterable list(String resourceGroupNa /** * List shared private link resources. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,8 +326,7 @@ public PagedIterable list( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -394,8 +383,7 @@ private Mono> getWithResponseAsync( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -450,8 +438,7 @@ private Mono> getWithResponseAsync( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -469,8 +456,7 @@ private Mono getAsync( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -488,8 +474,7 @@ public Response getWithResponse( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -506,8 +491,7 @@ public SharedPrivateLinkResourceInner get( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -574,8 +558,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -641,8 +624,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -673,8 +655,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -709,8 +690,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -724,7 +704,8 @@ public SyncPoller, SharedPrivateLinkR String resourceGroupName, String resourceName, SharedPrivateLinkResourceInner parameters) { - return beginCreateOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters) + return this + .beginCreateOrUpdateAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters) .getSyncPoller(); } @@ -732,8 +713,7 @@ public SyncPoller, SharedPrivateLinkR * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -749,7 +729,8 @@ public SyncPoller, SharedPrivateLinkR String resourceName, SharedPrivateLinkResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( sharedPrivateLinkResourceName, resourceGroupName, resourceName, parameters, context) .getSyncPoller(); } @@ -758,8 +739,7 @@ public SyncPoller, SharedPrivateLinkR * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -782,8 +762,7 @@ private Mono createOrUpdateAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -809,8 +788,7 @@ private Mono createOrUpdateAsync( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -831,8 +809,7 @@ public SharedPrivateLinkResourceInner createOrUpdate( * Create or update a shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The shared private link resource. * @param context The context to associate with this operation. @@ -856,8 +833,7 @@ public SharedPrivateLinkResourceInner createOrUpdate( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -913,8 +889,7 @@ private Mono>> deleteWithResponseAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -968,8 +943,7 @@ private Mono>> deleteWithResponseAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -991,8 +965,7 @@ private PollerFlux, Void> beginDeleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1015,8 +988,7 @@ private PollerFlux, Void> beginDeleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1026,15 +998,14 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { - return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName).getSyncPoller(); + return this.beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName).getSyncPoller(); } /** * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1045,7 +1016,8 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context) + return this + .beginDeleteAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context) .getSyncPoller(); } @@ -1053,8 +1025,7 @@ public SyncPoller, Void> beginDelete( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1073,8 +1044,7 @@ private Mono deleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1094,8 +1064,7 @@ private Mono deleteAsync( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1110,8 +1079,7 @@ public void delete(String sharedPrivateLinkResourceName, String resourceGroupNam * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 efea3e3d82bc..e9f73611411f 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 @@ -72,8 +72,7 @@ public final class SignalRsClientImpl implements SignalRsClient { public interface SignalRsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}" - + "/checkNameAvailability") + "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( @@ -98,8 +97,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -112,8 +110,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -127,8 +124,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -143,8 +139,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -158,8 +153,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -174,8 +168,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listKeys( @@ -189,9 +182,8 @@ Mono> listKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/regenerateKey") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> regenerateKey( @HostParam("$host") String endpoint, @@ -205,8 +197,7 @@ Mono>> regenerateKey( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/restart") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> restart( @@ -220,8 +211,7 @@ Mono>> restart( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" - + "/signalR/{resourceName}/skus") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/skus") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSkus( @@ -551,8 +541,7 @@ public PagedIterable list(Context context) { /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -604,8 +593,7 @@ private Mono> listByResourceGroupSinglePageA /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -656,8 +644,7 @@ private Mono> listByResourceGroupSinglePageA /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -674,8 +661,7 @@ private PagedFlux listByResourceGroupAsync(String resource /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -693,8 +679,7 @@ private PagedFlux listByResourceGroupAsync(String resource /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -709,8 +694,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -726,8 +710,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -775,8 +758,7 @@ private Mono> getByResourceGroupWithResponseAsync /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -822,8 +804,7 @@ private Mono> getByResourceGroupWithResponseAsync /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -839,8 +820,7 @@ private Mono getByResourceGroupAsync(String resourceGroupN /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -857,8 +837,7 @@ public Response getByResourceGroupWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -873,8 +852,7 @@ public SignalRResourceInner getByResourceGroup(String resourceGroupName, String /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -929,8 +907,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -983,8 +960,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1010,8 +986,7 @@ private PollerFlux, SignalRResourceInner> begin /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1035,8 +1010,7 @@ private PollerFlux, SignalRResourceInner> begin /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1047,14 +1021,13 @@ private PollerFlux, SignalRResourceInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRResourceInner> beginCreateOrUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1066,14 +1039,13 @@ public SyncPoller, SignalRResourceInner> beginC @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(); + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); } /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1092,8 +1064,7 @@ private Mono createOrUpdateAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1113,8 +1084,7 @@ private Mono createOrUpdateAsync( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1131,8 +1101,7 @@ public SignalRResourceInner createOrUpdate( /** * Create or update a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the create or update operation. * @param context The context to associate with this operation. @@ -1150,8 +1119,7 @@ public SignalRResourceInner createOrUpdate( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1198,8 +1166,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1245,8 +1212,7 @@ private Mono>> deleteWithResponseAsync( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1265,8 +1231,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1287,8 +1252,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1297,14 +1261,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { - return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); } /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1315,14 +1278,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1337,8 +1299,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1356,8 +1317,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, Co /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1371,8 +1331,7 @@ public void delete(String resourceGroupName, String resourceName) { /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1387,8 +1346,7 @@ public void delete(String resourceGroupName, String resourceName, Context contex /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1443,8 +1401,7 @@ private Mono>> updateWithResponseAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1497,8 +1454,7 @@ private Mono>> updateWithResponseAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1523,8 +1479,7 @@ private PollerFlux, SignalRResourceInner> begin /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1548,8 +1503,7 @@ private PollerFlux, SignalRResourceInner> begin /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1560,14 +1514,13 @@ private PollerFlux, SignalRResourceInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRResourceInner> beginUpdate( String resourceGroupName, String resourceName, SignalRResourceInner parameters) { - return beginUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1579,14 +1532,13 @@ public SyncPoller, SignalRResourceInner> beginU @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(); + return this.beginUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); } /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1605,8 +1557,7 @@ private Mono updateAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1626,8 +1577,7 @@ private Mono updateAsync( /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1643,8 +1593,7 @@ public SignalRResourceInner update(String resourceGroupName, String resourceName /** * Operation to update an exiting 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameters for the update operation. * @param context The context to associate with this operation. @@ -1662,8 +1611,7 @@ public SignalRResourceInner update( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1710,8 +1658,7 @@ private Mono> listKeysWithResponseAsync(String resour /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1757,8 +1704,7 @@ private Mono> listKeysWithResponseAsync( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1774,8 +1720,7 @@ private Mono listKeysAsync(String resourceGroupName, String re /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1792,8 +1737,7 @@ public Response listKeysWithResponse( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -1808,8 +1752,7 @@ public SignalRKeysInner listKeys(String resourceGroupName, String resourceName) /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1865,8 +1808,7 @@ private Mono>> regenerateKeyWithResponseAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -1920,8 +1862,7 @@ private Mono>> regenerateKeyWithResponseAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1947,8 +1888,7 @@ private PollerFlux, SignalRKeysInner> beginRegenera /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -1972,8 +1912,7 @@ private PollerFlux, SignalRKeysInner> beginRegenera /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1984,14 +1923,13 @@ private PollerFlux, SignalRKeysInner> beginRegenera @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SignalRKeysInner> beginRegenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { - return beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + return this.beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); } /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -2003,14 +1941,13 @@ public SyncPoller, SignalRKeysInner> beginRegenerat @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(); + return this.beginRegenerateKeyAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); } /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2029,8 +1966,7 @@ private Mono regenerateKeyAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -2050,8 +1986,7 @@ private Mono regenerateKeyAsync( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2068,8 +2003,7 @@ public SignalRKeysInner regenerateKey( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -2087,8 +2021,7 @@ public SignalRKeysInner regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2135,8 +2068,7 @@ private Mono>> restartWithResponseAsync(String resourc /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2182,8 +2114,7 @@ private Mono>> restartWithResponseAsync( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2202,8 +2133,7 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2224,8 +2154,7 @@ private PollerFlux, Void> beginRestartAsync( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2234,14 +2163,13 @@ private PollerFlux, Void> beginRestartAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName) { - return beginRestartAsync(resourceGroupName, resourceName).getSyncPoller(); + return this.beginRestartAsync(resourceGroupName, resourceName).getSyncPoller(); } /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2252,14 +2180,13 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart( String resourceGroupName, String resourceName, Context context) { - return beginRestartAsync(resourceGroupName, resourceName, context).getSyncPoller(); + return this.beginRestartAsync(resourceGroupName, resourceName, context).getSyncPoller(); } /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2274,8 +2201,7 @@ private Mono restartAsync(String resourceGroupName, String resourceName) { /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2293,8 +2219,7 @@ private Mono restartAsync(String resourceGroupName, String resourceName, C /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2308,8 +2233,7 @@ public void restart(String resourceGroupName, String resourceName) { /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2324,8 +2248,7 @@ public void restart(String resourceGroupName, String resourceName, Context conte /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2372,8 +2295,7 @@ private Mono> listSkusWithResponseAsync(String resourceGr /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2419,8 +2341,7 @@ private Mono> listSkusWithResponseAsync( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -2436,8 +2357,7 @@ private Mono listSkusAsync(String resourceGroupName, String resour /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2453,8 +2373,7 @@ public Response listSkusWithResponse(String resourceGroupName, Str /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/AclAction.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/AclAction.java index 2d1bed9145f1..01d2c4e8d604 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/AclAction.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/AclAction.java @@ -16,6 +16,15 @@ public final class AclAction extends ExpandableStringEnum { /** Static value Deny for AclAction. */ public static final AclAction DENY = fromString("Deny"); + /** + * Creates a new instance of AclAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AclAction() { + } + /** * Creates or finds a AclAction from its string representation. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomCertificate.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomCertificate.java index 0dd149dafd35..f63b4cf8678c 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomCertificate.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomCertificate.java @@ -32,7 +32,7 @@ public interface CustomCertificate { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -98,8 +98,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, resourceName. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @return the next definition stage. */ diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomDomain.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomDomain.java index 9f7b5c1138f1..8f376815cec8 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomDomain.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/CustomDomain.java @@ -32,7 +32,7 @@ public interface CustomDomain { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -91,8 +91,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, resourceName. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @return the next definition stage. */ diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/FeatureFlags.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/FeatureFlags.java index 02dced2adab4..18d5a04d1008 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/FeatureFlags.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/FeatureFlags.java @@ -32,6 +32,15 @@ public final class FeatureFlags extends ExpandableStringEnum { /** Static value EnableLiveTrace for FeatureFlags. */ public static final FeatureFlags ENABLE_LIVE_TRACE = fromString("EnableLiveTrace"); + /** + * Creates a new instance of FeatureFlags value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeatureFlags() { + } + /** * Creates or finds a FeatureFlags from its string representation. * 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 e497417b2437..cc8aef9ed59b 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 @@ -19,6 +19,15 @@ public final class KeyType extends ExpandableStringEnum { /** Static value Salt for KeyType. */ public static final KeyType SALT = fromString("Salt"); + /** + * Creates a new instance of KeyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyType() { + } + /** * 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 1fcf5d0af819..1ca122620219 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 @@ -11,7 +11,7 @@ /** A class represent managed identities used for request and response. */ @Fluent -public class ManagedIdentity { +public final class ManagedIdentity { /* * Represents the identity type: systemAssigned, userAssigned, None */ diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentityType.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentityType.java index edd8de528204..7e028e163e9e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentityType.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ManagedIdentityType.java @@ -19,6 +19,15 @@ public final class ManagedIdentityType extends ExpandableStringEnum tags(); + + /** + * Gets the sku property: The billing information of the resource. + * + * @return the sku value. + */ + ResourceSku sku(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.signalr.fluent.models.ReplicaInner object. + * + * @return the inner object. + */ + ReplicaInner innerModel(); + + /** The entirety of the Replica definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithCreate { + } + /** The Replica definition stages. */ + interface DefinitionStages { + /** The first stage of the Replica definition. */ + interface Blank extends WithLocation { + } + /** The stage of the Replica definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the Replica definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @return the next definition stage. + */ + WithCreate withExistingSignalR(String resourceGroupName, String resourceName); + } + /** + * The stage of the Replica definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku { + /** + * Executes the create request. + * + * @return the created resource. + */ + Replica create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Replica create(Context context); + } + /** The stage of the Replica definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the Replica definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The billing information of the resource.. + * + * @param sku The billing information of the resource. + * @return the next definition stage. + */ + WithCreate withSku(ResourceSku sku); + } + } + /** + * Begins update for the Replica resource. + * + * @return the stage of resource update. + */ + Replica.Update update(); + + /** The template for Replica update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Replica apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Replica apply(Context context); + } + /** The Replica update stages. */ + interface UpdateStages { + /** The stage of the Replica update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the Replica update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The billing information of the resource.. + * + * @param sku The billing information of the resource. + * @return the next definition stage. + */ + Update withSku(ResourceSku sku); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Replica refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Replica refresh(Context context); + + /** + * Operation to restart a replica. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restart(); + + /** + * Operation to restart a replica. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restart(Context context); +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ReplicaList.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ReplicaList.java new file mode 100644 index 000000000000..bd5f8e7fdc0b --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ReplicaList.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.resourcemanager.signalr.fluent.models.ReplicaInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ReplicaList model. */ +@Fluent +public final class ReplicaList { + /* + * List of the replica + */ + @JsonProperty(value = "value") + 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") + private String nextLink; + + /** Creates an instance of ReplicaList class. */ + public ReplicaList() { + } + + /** + * Get the value property: List of the replica. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of the replica. + * + * @param value the value value to set. + * @return the ReplicaList object itself. + */ + public ReplicaList withValue(List value) { + this.value = value; + return this; + } + + /** + * 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; + } + + /** + * Set 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. + * + * @param nextLink the nextLink value to set. + * @return the ReplicaList object itself. + */ + public ReplicaList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * 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/models/ScaleType.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ScaleType.java index fb688748291d..c8f0f4828b16 100644 --- 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 @@ -19,6 +19,15 @@ public final class ScaleType extends ExpandableStringEnum { /** Static value Automatic for ScaleType. */ public static final ScaleType AUTOMATIC = fromString("Automatic"); + /** + * Creates a new instance of ScaleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScaleType() { + } + /** * Creates or finds a ScaleType from its string representation. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ServiceKind.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ServiceKind.java index 9a5cf7086f5e..5b8297f30067 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ServiceKind.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/ServiceKind.java @@ -16,6 +16,15 @@ public final class ServiceKind extends ExpandableStringEnum { /** Static value RawWebSockets for ServiceKind. */ public static final ServiceKind RAW_WEB_SOCKETS = fromString("RawWebSockets"); + /** + * Creates a new instance of ServiceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceKind() { + } + /** * Creates or finds a ServiceKind from its string representation. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResource.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResource.java index 53ce0d562935..bb9bfc3ca8a4 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResource.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResource.java @@ -32,7 +32,7 @@ public interface SharedPrivateLinkResource { String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -102,8 +102,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, resourceName. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @return the next definition stage. */ diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResourceStatus.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResourceStatus.java index 3a17b170d538..351b2a0aa5f4 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResourceStatus.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SharedPrivateLinkResourceStatus.java @@ -25,6 +25,15 @@ public final class SharedPrivateLinkResourceStatus extends ExpandableStringEnum< /** Static value Timeout for SharedPrivateLinkResourceStatus. */ public static final SharedPrivateLinkResourceStatus TIMEOUT = fromString("Timeout"); + /** + * Creates a new instance of SharedPrivateLinkResourceStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SharedPrivateLinkResourceStatus() { + } + /** * Creates or finds a SharedPrivateLinkResourceStatus from its string representation. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomCertificates.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomCertificates.java index 6fae61fd5904..7cd37c985908 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomCertificates.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomCertificates.java @@ -13,8 +13,7 @@ public interface SignalRCustomCertificates { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ public interface SignalRCustomCertificates { /** * List all custom certificates. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,8 +38,7 @@ public interface SignalRCustomCertificates { /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -56,8 +53,7 @@ Response getWithResponse( /** * Get a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,8 +66,7 @@ Response getWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @param context The context to associate with this operation. @@ -86,8 +81,7 @@ Response deleteWithResponse( /** * Delete a custom certificate. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param certificateName Custom certificate name. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomDomains.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomDomains.java index f295e33b9212..505cda6614f3 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomDomains.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRCustomDomains.java @@ -13,8 +13,7 @@ public interface SignalRCustomDomains { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ public interface SignalRCustomDomains { /** * List all custom domains. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,8 +38,7 @@ public interface SignalRCustomDomains { /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. @@ -55,8 +52,7 @@ public interface SignalRCustomDomains { /** * Get a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -69,8 +65,7 @@ public interface SignalRCustomDomains { /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -82,8 +77,7 @@ public interface SignalRCustomDomains { /** * Delete a custom domain. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param name Custom domain name. * @param context The context to associate with this operation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateEndpointConnections.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateEndpointConnections.java index 1191af2cef04..7522b3a47263 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateEndpointConnections.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateEndpointConnections.java @@ -14,8 +14,7 @@ public interface SignalRPrivateEndpointConnections { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -27,8 +26,7 @@ public interface SignalRPrivateEndpointConnections { /** * List private endpoint connections. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,9 +39,9 @@ public interface SignalRPrivateEndpointConnections { /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,9 +55,9 @@ Response getWithResponse( /** * Get the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -71,9 +69,9 @@ Response getWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @param context The context to associate with this operation. @@ -92,9 +90,9 @@ Response updateWithResponse( /** * Update the state of specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,9 +109,9 @@ PrivateEndpointConnection update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -124,9 +122,9 @@ PrivateEndpointConnection update( /** * Delete the specified private endpoint connection. * - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @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 privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateLinkResources.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateLinkResources.java index f58670322d1d..c5eaed23b19e 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateLinkResources.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRPrivateLinkResources.java @@ -12,8 +12,7 @@ public interface SignalRPrivateLinkResources { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -26,8 +25,7 @@ public interface SignalRPrivateLinkResources { /** * Get the private link resources that need to be created for a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRReplicas.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRReplicas.java new file mode 100644 index 000000000000..be0a3996d3e3 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRReplicas.java @@ -0,0 +1,170 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of SignalRReplicas. */ +public interface SignalRReplicas { + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all replicas belong to this resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Get the replica and its properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @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 replica and its properties. + */ + Replica get(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Operation to delete a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restart(String resourceGroupName, String resourceName, String replicaName); + + /** + * Operation to restart a replica. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @param replicaName The name of the replica. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restart(String resourceGroupName, String resourceName, String replicaName, Context context); + + /** + * Get the replica and its properties. + * + * @param id the resource ID. + * @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 replica and its properties along with {@link Response}. + */ + Replica getById(String id); + + /** + * Get the replica and its properties. + * + * @param id the resource ID. + * @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 replica and its properties along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Operation to delete a replica. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Operation to delete a replica. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Replica resource. + * + * @param name resource name. + * @return the first stage of the new Replica definition. + */ + Replica.DefinitionStages.Blank define(String name); +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRRequestType.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRRequestType.java index 10ea4b3dd06d..929b352a7f80 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRRequestType.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRRequestType.java @@ -22,6 +22,15 @@ public final class SignalRRequestType extends ExpandableStringEnum getWithResponse( * Get the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -71,8 +67,7 @@ Response getWithResponse( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -84,8 +79,7 @@ Response getWithResponse( * Delete the specified shared private link resource. * * @param sharedPrivateLinkResourceName The name of the shared private link 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRSkuTier.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRSkuTier.java index fed52ba53a03..6f095428b5a9 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRSkuTier.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRSkuTier.java @@ -26,6 +26,15 @@ public final class SignalRSkuTier extends ExpandableStringEnum { /** Static value Premium for SignalRSkuTier. */ public static final SignalRSkuTier PREMIUM = fromString("Premium"); + /** + * Creates a new instance of SignalRSkuTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SignalRSkuTier() { + } + /** * Creates or finds a SignalRSkuTier from its string representation. * diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRTlsSettings.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRTlsSettings.java index b23fcb518f21..3c5087502c0f 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRTlsSettings.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/SignalRTlsSettings.java @@ -11,7 +11,8 @@ @Fluent public final class SignalRTlsSettings { /* - * Request client certificate during TLS handshake if enabled + * Request client certificate during TLS handshake if enabled. Not supported for free tier. Any input will be + * ignored for free tier. */ @JsonProperty(value = "clientCertEnabled") private Boolean clientCertEnabled; @@ -21,7 +22,8 @@ public SignalRTlsSettings() { } /** - * Get the clientCertEnabled property: Request client certificate during TLS handshake if enabled. + * Get the clientCertEnabled property: Request client certificate during TLS handshake if enabled. Not supported for + * free tier. Any input will be ignored for free tier. * * @return the clientCertEnabled value. */ @@ -30,7 +32,8 @@ public Boolean clientCertEnabled() { } /** - * Set the clientCertEnabled property: Request client certificate during TLS handshake if enabled. + * Set the clientCertEnabled property: Request client certificate during TLS handshake if enabled. Not supported for + * free tier. Any input will be ignored for free tier. * * @param clientCertEnabled the clientCertEnabled value to set. * @return the SignalRTlsSettings object itself. 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 6b7605c2b0ab..98adfb6b6900 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 @@ -61,8 +61,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -74,8 +73,7 @@ Response checkNameAvailabilityWithResponse( /** * Handles requests to list all resources in a resource group. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -88,8 +86,7 @@ Response checkNameAvailabilityWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,8 +100,7 @@ Response getByResourceGroupWithResponse( /** * Get the resource and its properties. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -116,8 +112,7 @@ Response getByResourceGroupWithResponse( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -128,8 +123,7 @@ Response getByResourceGroupWithResponse( /** * Operation to delete a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,8 +135,7 @@ Response getByResourceGroupWithResponse( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -155,8 +148,7 @@ Response getByResourceGroupWithResponse( /** * Get the access keys 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -168,8 +160,7 @@ Response getByResourceGroupWithResponse( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,8 +173,7 @@ Response getByResourceGroupWithResponse( /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. * - * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param parameters Parameter that describes the Regenerate Key Operation. * @param context The context to associate with this operation. @@ -198,8 +188,7 @@ SignalRKeys regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -210,8 +199,7 @@ SignalRKeys regenerateKey( /** * Operation to restart a 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -223,8 +211,7 @@ SignalRKeys regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,8 +224,7 @@ SignalRKeys regenerateKey( /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. * @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. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/UpstreamAuthType.java b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/UpstreamAuthType.java index 3d1a2d2fb0ce..759206951282 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/UpstreamAuthType.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/models/UpstreamAuthType.java @@ -16,6 +16,15 @@ public final class UpstreamAuthType extends ExpandableStringEnum Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasDeleteSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasDeleteSamples.java new file mode 100644 index 000000000000..b82d2b1d4af1 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +/** Samples for SignalRReplicas Delete. */ +public final class SignalRReplicasDeleteSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Delete.json + */ + /** + * Sample code: SignalRReplicas_Delete. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasDelete(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRReplicas() + .deleteWithResponse( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasGetSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasGetSamples.java new file mode 100644 index 000000000000..646fa837c131 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +/** Samples for SignalRReplicas Get. */ +public final class SignalRReplicasGetSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Get.json + */ + /** + * Sample code: SignalRReplicas_Get. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasGet(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRReplicas() + .getWithResponse( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasListSamples.java new file mode 100644 index 000000000000..71335f102cc3 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasListSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +/** Samples for SignalRReplicas List. */ +public final class SignalRReplicasListSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_List.json + */ + /** + * Sample code: SignalRReplicas_List. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasList(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager.signalRReplicas().list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasRestartSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasRestartSamples.java new file mode 100644 index 000000000000..b69bbcb2342d --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasRestartSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.signalr.generated; + +/** Samples for SignalRReplicas Restart. */ +public final class SignalRReplicasRestartSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Restart.json + */ + /** + * Sample code: SignalRReplicas_Restart. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasRestart(com.azure.resourcemanager.signalr.SignalRManager manager) { + manager + .signalRReplicas() + .restart( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasUpdateSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasUpdateSamples.java new file mode 100644 index 000000000000..16257b866023 --- /dev/null +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRReplicasUpdateSamples.java @@ -0,0 +1,47 @@ +// 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.resourcemanager.signalr.models.Replica; +import com.azure.resourcemanager.signalr.models.ResourceSku; +import com.azure.resourcemanager.signalr.models.SignalRSkuTier; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SignalRReplicas Update. */ +public final class SignalRReplicasUpdateSamples { + /* + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRReplicas_Update.json + */ + /** + * Sample code: SignalRReplicas_Update. + * + * @param manager Entry point to SignalRManager. + */ + public static void signalRReplicasUpdate(com.azure.resourcemanager.signalr.SignalRManager manager) { + Replica resource = + manager + .signalRReplicas() + .getWithResponse( + "myResourceGroup", "mySignalRService", "mySignalRService-eastus", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key1", "value1")) + .withSku(new ResourceSku().withName("Premium_P1").withTier(SignalRSkuTier.PREMIUM).withCapacity(1)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRestartSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRestartSamples.java index bf6fb3aa3109..66597c3c3015 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRestartSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRRestartSamples.java @@ -4,12 +4,10 @@ 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/preview/2022-08-01-preview/examples/SignalR_Restart.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_Restart.json */ /** * Sample code: SignalR_Restart. @@ -17,6 +15,6 @@ public final class SignalRRestartSamples { * @param manager Entry point to SignalRManager. */ public static void signalRRestart(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRs().restart("myResourceGroup", "mySignalRService", Context.NONE); + manager.signalRs().restart("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java index faeaad53c6d8..66e2b30a2285 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for SignalRSharedPrivateLinkResources CreateOrUpdate. */ public final class SignalRSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: SignalRSharedPrivateLinkResources_CreateOrUpdate. diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteSamples.java index 6ce9057ff528..05fff54e0eac 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteSamples.java @@ -4,12 +4,10 @@ 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/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_Delete.json */ /** * Sample code: SignalRSharedPrivateLinkResources_Delete. @@ -20,6 +18,6 @@ public static void signalRSharedPrivateLinkResourcesDelete( com.azure.resourcemanager.signalr.SignalRManager manager) { manager .signalRSharedPrivateLinkResources() - .delete("upstream", "myResourceGroup", "mySignalRService", Context.NONE); + .delete("upstream", "myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetSamples.java index fb0d202fd0f7..624054536411 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetSamples.java @@ -4,12 +4,10 @@ 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/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_Get.json */ /** * Sample code: SignalRSharedPrivateLinkResources_Get. @@ -19,6 +17,6 @@ public final class SignalRSharedPrivateLinkResourcesGetSamples { public static void signalRSharedPrivateLinkResourcesGet(com.azure.resourcemanager.signalr.SignalRManager manager) { manager .signalRSharedPrivateLinkResources() - .getWithResponse("upstream", "myResourceGroup", "mySignalRService", Context.NONE); + .getWithResponse("upstream", "myResourceGroup", "mySignalRService", com.azure.core.util.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 index 82cc606c085d..f62f34c35bfc 100644 --- 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 @@ -4,12 +4,10 @@ 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/preview/2022-08-01-preview/examples/SignalRSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalRSharedPrivateLinkResources_List.json */ /** * Sample code: SignalRSharedPrivateLinkResources_List. @@ -17,6 +15,8 @@ public final class SignalRSharedPrivateLinkResourcesListSamples { * @param manager Entry point to SignalRManager. */ public static void signalRSharedPrivateLinkResourcesList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.signalRSharedPrivateLinkResources().list("myResourceGroup", "mySignalRService", Context.NONE); + manager + .signalRSharedPrivateLinkResources() + .list("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRUpdateSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRUpdateSamples.java index 8329499fb368..b4505f98c1b1 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRUpdateSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/SignalRUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.signalr.generated; -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.LiveTraceCategory; @@ -34,7 +33,7 @@ /** Samples for SignalR Update. */ public final class SignalRUpdateSamples { /* - * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/SignalR_Update.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/SignalR_Update.json */ /** * Sample code: SignalR_Update. @@ -45,12 +44,12 @@ public static void signalRUpdate(com.azure.resourcemanager.signalr.SignalRManage SignalRResource resource = manager .signalRs() - .getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", Context.NONE) + .getByResourceGroupWithResponse("myResourceGroup", "mySignalRService", com.azure.core.util.Context.NONE) .getValue(); resource .update() .withTags(mapOf("key1", "value1")) - .withSku(new ResourceSku().withName("Standard_S1").withTier(SignalRSkuTier.STANDARD).withCapacity(1)) + .withSku(new ResourceSku().withName("Premium_P1").withTier(SignalRSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new SignalRTlsSettings().withClientCertEnabled(false)) .withFeatures( diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/UsagesListSamples.java b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/UsagesListSamples.java index 43cade8eadbc..92617409c385 100644 --- a/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/UsagesListSamples.java +++ b/sdk/signalr/azure-resourcemanager-signalr/src/samples/java/com/azure/resourcemanager/signalr/generated/UsagesListSamples.java @@ -4,12 +4,10 @@ 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/preview/2022-08-01-preview/examples/Usages_List.json + * x-ms-original-file: specification/signalr/resource-manager/Microsoft.SignalRService/preview/2023-03-01-preview/examples/Usages_List.json */ /** * Sample code: Usages_List. @@ -17,6 +15,6 @@ public final class UsagesListSamples { * @param manager Entry point to SignalRManager. */ public static void usagesList(com.azure.resourcemanager.signalr.SignalRManager manager) { - manager.usages().list("eastus", Context.NONE); + manager.usages().list("eastus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainInnerTests.java deleted file mode 100644 index 0f95fcce9bb9..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainInnerTests.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.CustomDomainInner; -import com.azure.resourcemanager.signalr.models.ResourceReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainInnerTests { - @Test - public void testDeserialize() { - CustomDomainInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"domainName\":\"mygtdssls\",\"customCertificate\":{\"id\":\"mweriofzpy\"}},\"id\":\"semwabnet\",\"name\":\"hhszh\",\"type\":\"d\"}") - .toObject(CustomDomainInner.class); - Assertions.assertEquals("mygtdssls", model.domainName()); - Assertions.assertEquals("mweriofzpy", model.customCertificate().id()); - } - - @Test - public void testSerialize() { - CustomDomainInner model = - new CustomDomainInner() - .withDomainName("mygtdssls") - .withCustomCertificate(new ResourceReference().withId("mweriofzpy")); - model = BinaryData.fromObject(model).toObject(CustomDomainInner.class); - Assertions.assertEquals("mygtdssls", model.domainName()); - Assertions.assertEquals("mweriofzpy", model.customCertificate().id()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainListTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainListTests.java deleted file mode 100644 index d48b4b535425..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainListTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.CustomDomainInner; -import com.azure.resourcemanager.signalr.models.CustomDomainList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainListTests { - @Test - public void testDeserialize() { - CustomDomainList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"domainName\":\"gynduha\"},\"id\":\"hqlkthumaqo\",\"name\":\"bgycduiertgccym\",\"type\":\"aolps\"},{\"properties\":{\"provisioningState\":\"Creating\",\"domainName\":\"fmmdnbbg\"},\"id\":\"zpswiydmc\",\"name\":\"yhz\",\"type\":\"xssadbzmnvdf\"},{\"properties\":{\"provisioningState\":\"Moving\",\"domainName\":\"ao\"},\"id\":\"vxzbncb\",\"name\":\"ylpstdbhhxsrzdz\",\"type\":\"cers\"}],\"nextLink\":\"ntnev\"}") - .toObject(CustomDomainList.class); - Assertions.assertEquals("gynduha", model.value().get(0).domainName()); - Assertions.assertEquals("ntnev", model.nextLink()); - } - - @Test - public void testSerialize() { - CustomDomainList model = - new CustomDomainList() - .withValue( - Arrays - .asList( - new CustomDomainInner().withDomainName("gynduha"), - new CustomDomainInner().withDomainName("fmmdnbbg"), - new CustomDomainInner().withDomainName("ao"))) - .withNextLink("ntnev"); - model = BinaryData.fromObject(model).toObject(CustomDomainList.class); - Assertions.assertEquals("gynduha", model.value().get(0).domainName()); - Assertions.assertEquals("ntnev", model.nextLink()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainPropertiesTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainPropertiesTests.java deleted file mode 100644 index b498a17e28c0..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/CustomDomainPropertiesTests.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.CustomDomainProperties; -import com.azure.resourcemanager.signalr.models.ResourceReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainPropertiesTests { - @Test - public void testDeserialize() { - CustomDomainProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"domainName\":\"wiwubm\",\"customCertificate\":{\"id\":\"besldnkwwtppjflc\"}}") - .toObject(CustomDomainProperties.class); - Assertions.assertEquals("wiwubm", model.domainName()); - Assertions.assertEquals("besldnkwwtppjflc", model.customCertificate().id()); - } - - @Test - public void testSerialize() { - CustomDomainProperties model = - new CustomDomainProperties() - .withDomainName("wiwubm") - .withCustomCertificate(new ResourceReference().withId("besldnkwwtppjflc")); - model = BinaryData.fromObject(model).toObject(CustomDomainProperties.class); - Assertions.assertEquals("wiwubm", model.domainName()); - Assertions.assertEquals("besldnkwwtppjflc", model.customCertificate().id()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/DimensionTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/DimensionTests.java deleted file mode 100644 index 22baaf940320..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/DimensionTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.Dimension; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DimensionTests { - @Test - public void testDeserialize() { - Dimension model = - BinaryData - .fromString( - "{\"name\":\"gsntnbybkzgcwr\",\"displayName\":\"lxxwrljdouskc\",\"internalName\":\"kocrcjdkwtnhx\",\"toBeExportedForShoebox\":true}") - .toObject(Dimension.class); - Assertions.assertEquals("gsntnbybkzgcwr", model.name()); - Assertions.assertEquals("lxxwrljdouskc", model.displayName()); - Assertions.assertEquals("kocrcjdkwtnhx", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @Test - public void testSerialize() { - Dimension model = - new Dimension() - .withName("gsntnbybkzgcwr") - .withDisplayName("lxxwrljdouskc") - .withInternalName("kocrcjdkwtnhx") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(Dimension.class); - Assertions.assertEquals("gsntnbybkzgcwr", model.name()); - Assertions.assertEquals("lxxwrljdouskc", model.displayName()); - Assertions.assertEquals("kocrcjdkwtnhx", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceCategoryTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceCategoryTests.java deleted file mode 100644 index 9d5c20223e51..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceCategoryTests.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.LiveTraceCategory; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LiveTraceCategoryTests { - @Test - public void testDeserialize() { - LiveTraceCategory model = - BinaryData - .fromString("{\"name\":\"plrbpbewtghf\",\"enabled\":\"lcgwxzvlvqh\"}") - .toObject(LiveTraceCategory.class); - Assertions.assertEquals("plrbpbewtghf", model.name()); - Assertions.assertEquals("lcgwxzvlvqh", model.enabled()); - } - - @Test - public void testSerialize() { - LiveTraceCategory model = new LiveTraceCategory().withName("plrbpbewtghf").withEnabled("lcgwxzvlvqh"); - model = BinaryData.fromObject(model).toObject(LiveTraceCategory.class); - Assertions.assertEquals("plrbpbewtghf", model.name()); - Assertions.assertEquals("lcgwxzvlvqh", model.enabled()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceConfigurationTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceConfigurationTests.java deleted file mode 100644 index 6debac03cba3..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LiveTraceConfigurationTests.java +++ /dev/null @@ -1,44 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.LiveTraceCategory; -import com.azure.resourcemanager.signalr.models.LiveTraceConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LiveTraceConfigurationTests { - @Test - public void testDeserialize() { - LiveTraceConfiguration model = - BinaryData - .fromString( - "{\"enabled\":\"wgxhn\",\"categories\":[{\"name\":\"fbkp\",\"enabled\":\"gklwn\"},{\"name\":\"hjdauwhvylwz\",\"enabled\":\"dhxujznbmpo\"},{\"name\":\"wpr\",\"enabled\":\"lve\"},{\"name\":\"lupj\",\"enabled\":\"hfxobbcswsrtj\"}]}") - .toObject(LiveTraceConfiguration.class); - Assertions.assertEquals("wgxhn", model.enabled()); - Assertions.assertEquals("fbkp", model.categories().get(0).name()); - Assertions.assertEquals("gklwn", model.categories().get(0).enabled()); - } - - @Test - public void testSerialize() { - LiveTraceConfiguration model = - new LiveTraceConfiguration() - .withEnabled("wgxhn") - .withCategories( - Arrays - .asList( - new LiveTraceCategory().withName("fbkp").withEnabled("gklwn"), - new LiveTraceCategory().withName("hjdauwhvylwz").withEnabled("dhxujznbmpo"), - new LiveTraceCategory().withName("wpr").withEnabled("lve"), - new LiveTraceCategory().withName("lupj").withEnabled("hfxobbcswsrtj"))); - model = BinaryData.fromObject(model).toObject(LiveTraceConfiguration.class); - Assertions.assertEquals("wgxhn", model.enabled()); - Assertions.assertEquals("fbkp", model.categories().get(0).name()); - Assertions.assertEquals("gklwn", model.categories().get(0).enabled()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LogSpecificationTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LogSpecificationTests.java deleted file mode 100644 index 8fe27fdd63d8..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/LogSpecificationTests.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.LogSpecification; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LogSpecificationTests { - @Test - public void testDeserialize() { - LogSpecification model = - BinaryData - .fromString("{\"name\":\"iksqr\",\"displayName\":\"ssainqpjwnzll\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("iksqr", model.name()); - Assertions.assertEquals("ssainqpjwnzll", model.displayName()); - } - - @Test - public void testSerialize() { - LogSpecification model = new LogSpecification().withName("iksqr").withDisplayName("ssainqpjwnzll"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("iksqr", model.name()); - Assertions.assertEquals("ssainqpjwnzll", model.displayName()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentitySettingsTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentitySettingsTests.java deleted file mode 100644 index 82660a5dea96..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentitySettingsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ManagedIdentitySettings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedIdentitySettingsTests { - @Test - public void testDeserialize() { - ManagedIdentitySettings model = - BinaryData.fromString("{\"resource\":\"zfq\"}").toObject(ManagedIdentitySettings.class); - Assertions.assertEquals("zfq", model.resource()); - } - - @Test - public void testSerialize() { - ManagedIdentitySettings model = new ManagedIdentitySettings().withResource("zfq"); - model = BinaryData.fromObject(model).toObject(ManagedIdentitySettings.class); - Assertions.assertEquals("zfq", model.resource()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentityTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentityTests.java deleted file mode 100644 index a785ddc33f77..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ManagedIdentityTests.java +++ /dev/null @@ -1,54 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ManagedIdentity; -import com.azure.resourcemanager.signalr.models.ManagedIdentityType; -import com.azure.resourcemanager.signalr.models.UserAssignedIdentityProperty; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedIdentityTests { - @Test - public void testDeserialize() { - ManagedIdentity model = - BinaryData - .fromString( - "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"bhsfxob\":{\"principalId\":\"cqaqtdoqmcbx\",\"clientId\":\"vxysl\"},\"shqjohxcrsbf\":{\"principalId\":\"tkblmpewww\",\"clientId\":\"krvrns\"},\"ybsrfbjfdtwss\":{\"principalId\":\"asrru\",\"clientId\":\"bhsqfsubcgjbirxb\"}},\"principalId\":\"ftpvjzbexil\",\"tenantId\":\"nfqqnvwp\"}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.type()); - } - - @Test - public void testSerialize() { - ManagedIdentity model = - new ManagedIdentity() - .withType(ManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "bhsfxob", - new UserAssignedIdentityProperty(), - "shqjohxcrsbf", - new UserAssignedIdentityProperty(), - "ybsrfbjfdtwss", - new UserAssignedIdentityProperty())); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/MetricSpecificationTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/MetricSpecificationTests.java deleted file mode 100644 index b2d4006b768e..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,72 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.Dimension; -import com.azure.resourcemanager.signalr.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MetricSpecificationTests { - @Test - public void testDeserialize() { - MetricSpecification model = - BinaryData - .fromString( - "{\"name\":\"fpdvhpfxxypi\",\"displayName\":\"nmayhuybb\",\"displayDescription\":\"odepoogin\",\"unit\":\"amiheognarxz\",\"aggregationType\":\"heotusiv\",\"fillGapWithZero\":\"v\",\"category\":\"iqihn\",\"dimensions\":[{\"name\":\"bwjzr\",\"displayName\":\"ygxgispemvtz\",\"internalName\":\"ufubl\",\"toBeExportedForShoebox\":false},{\"name\":\"qeof\",\"displayName\":\"e\",\"internalName\":\"hqjbasvmsmj\",\"toBeExportedForShoebox\":true}]}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("fpdvhpfxxypi", model.name()); - Assertions.assertEquals("nmayhuybb", model.displayName()); - Assertions.assertEquals("odepoogin", model.displayDescription()); - Assertions.assertEquals("amiheognarxz", model.unit()); - Assertions.assertEquals("heotusiv", model.aggregationType()); - Assertions.assertEquals("v", model.fillGapWithZero()); - Assertions.assertEquals("iqihn", model.category()); - Assertions.assertEquals("bwjzr", model.dimensions().get(0).name()); - Assertions.assertEquals("ygxgispemvtz", model.dimensions().get(0).displayName()); - Assertions.assertEquals("ufubl", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - } - - @Test - public void testSerialize() { - MetricSpecification model = - new MetricSpecification() - .withName("fpdvhpfxxypi") - .withDisplayName("nmayhuybb") - .withDisplayDescription("odepoogin") - .withUnit("amiheognarxz") - .withAggregationType("heotusiv") - .withFillGapWithZero("v") - .withCategory("iqihn") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("bwjzr") - .withDisplayName("ygxgispemvtz") - .withInternalName("ufubl") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("qeof") - .withDisplayName("e") - .withInternalName("hqjbasvmsmj") - .withToBeExportedForShoebox(true))); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("fpdvhpfxxypi", model.name()); - Assertions.assertEquals("nmayhuybb", model.displayName()); - Assertions.assertEquals("odepoogin", model.displayDescription()); - Assertions.assertEquals("amiheognarxz", model.unit()); - Assertions.assertEquals("heotusiv", model.aggregationType()); - Assertions.assertEquals("v", model.fillGapWithZero()); - Assertions.assertEquals("iqihn", model.category()); - Assertions.assertEquals("bwjzr", model.dimensions().get(0).name()); - Assertions.assertEquals("ygxgispemvtz", model.dimensions().get(0).displayName()); - Assertions.assertEquals("ufubl", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityInnerTests.java deleted file mode 100644 index 7ccae7c94b4e..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityInnerTests.java +++ /dev/null @@ -1,33 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NameAvailabilityInnerTests { - @Test - public void testDeserialize() { - NameAvailabilityInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"zdzevndh\",\"message\":\"wpdappdsbdkv\"}") - .toObject(NameAvailabilityInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("zdzevndh", model.reason()); - Assertions.assertEquals("wpdappdsbdkv", model.message()); - } - - @Test - public void testSerialize() { - NameAvailabilityInner model = - new NameAvailabilityInner().withNameAvailable(true).withReason("zdzevndh").withMessage("wpdappdsbdkv"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("zdzevndh", model.reason()); - Assertions.assertEquals("wpdappdsbdkv", model.message()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityParametersTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityParametersTests.java deleted file mode 100644 index 22cc5265caac..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NameAvailabilityParametersTests.java +++ /dev/null @@ -1,31 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NameAvailabilityParametersTests { - @Test - public void testDeserialize() { - NameAvailabilityParameters model = - BinaryData - .fromString("{\"type\":\"fmppe\",\"name\":\"bvmgxsabkyqduuji\"}") - .toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("fmppe", model.type()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.name()); - } - - @Test - public void testSerialize() { - NameAvailabilityParameters model = - new NameAvailabilityParameters().withType("fmppe").withName("bvmgxsabkyqduuji"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("fmppe", model.type()); - Assertions.assertEquals("bvmgxsabkyqduuji", model.name()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NetworkAclTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NetworkAclTests.java deleted file mode 100644 index 680e1d475f9f..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/NetworkAclTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.NetworkAcl; -import com.azure.resourcemanager.signalr.models.SignalRRequestType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NetworkAclTests { - @Test - public void testDeserialize() { - NetworkAcl model = - BinaryData - .fromString( - "{\"allow\":[\"ClientConnection\"],\"deny\":[\"ClientConnection\",\"RESTAPI\",\"ServerConnection\"]}") - .toObject(NetworkAcl.class); - Assertions.assertEquals(SignalRRequestType.CLIENT_CONNECTION, model.allow().get(0)); - Assertions.assertEquals(SignalRRequestType.CLIENT_CONNECTION, model.deny().get(0)); - } - - @Test - public void testSerialize() { - NetworkAcl model = - new NetworkAcl() - .withAllow(Arrays.asList(SignalRRequestType.CLIENT_CONNECTION)) - .withDeny( - Arrays - .asList( - SignalRRequestType.CLIENT_CONNECTION, - SignalRRequestType.RESTAPI, - SignalRRequestType.SERVER_CONNECTION)); - model = BinaryData.fromObject(model).toObject(NetworkAcl.class); - Assertions.assertEquals(SignalRRequestType.CLIENT_CONNECTION, model.allow().get(0)); - Assertions.assertEquals(SignalRRequestType.CLIENT_CONNECTION, model.deny().get(0)); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationDisplayTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationDisplayTests.java deleted file mode 100644 index 1eca71148e35..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationDisplayTests.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"tihfx\",\"resource\":\"jbpzvgnwzsymg\",\"operation\":\"uf\",\"description\":\"zk\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("tihfx", model.provider()); - Assertions.assertEquals("jbpzvgnwzsymg", model.resource()); - Assertions.assertEquals("uf", model.operation()); - Assertions.assertEquals("zk", model.description()); - } - - @Test - public void testSerialize() { - OperationDisplay model = - new OperationDisplay() - .withProvider("tihfx") - .withResource("jbpzvgnwzsymg") - .withOperation("uf") - .withDescription("zk"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("tihfx", model.provider()); - Assertions.assertEquals("jbpzvgnwzsymg", model.resource()); - Assertions.assertEquals("uf", model.operation()); - Assertions.assertEquals("zk", model.description()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationInnerTests.java deleted file mode 100644 index 650087bb335e..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationInnerTests.java +++ /dev/null @@ -1,61 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.OperationInner; -import com.azure.resourcemanager.signalr.models.OperationDisplay; -import com.azure.resourcemanager.signalr.models.OperationProperties; -import com.azure.resourcemanager.signalr.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationInnerTests { - @Test - public void testDeserialize() { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"rh\",\"isDataAction\":true,\"display\":{\"provider\":\"hs\",\"resource\":\"urkdtmlx\",\"operation\":\"kuksjtxukcdm\",\"description\":\"rcryuanzwuxzdxta\"},\"origin\":\"lhmwhfpmrqobm\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[],\"logSpecifications\":[]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("rh", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("hs", model.display().provider()); - Assertions.assertEquals("urkdtmlx", model.display().resource()); - Assertions.assertEquals("kuksjtxukcdm", model.display().operation()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.display().description()); - Assertions.assertEquals("lhmwhfpmrqobm", model.origin()); - } - - @Test - public void testSerialize() { - OperationInner model = - new OperationInner() - .withName("rh") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("hs") - .withResource("urkdtmlx") - .withOperation("kuksjtxukcdm") - .withDescription("rcryuanzwuxzdxta")) - .withOrigin("lhmwhfpmrqobm") - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications(Arrays.asList()) - .withLogSpecifications(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("rh", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("hs", model.display().provider()); - Assertions.assertEquals("urkdtmlx", model.display().resource()); - Assertions.assertEquals("kuksjtxukcdm", model.display().operation()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.display().description()); - Assertions.assertEquals("lhmwhfpmrqobm", model.origin()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationListTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationListTests.java deleted file mode 100644 index e10a22c51bd5..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationListTests.java +++ /dev/null @@ -1,85 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.OperationInner; -import com.azure.resourcemanager.signalr.models.OperationDisplay; -import com.azure.resourcemanager.signalr.models.OperationList; -import com.azure.resourcemanager.signalr.models.OperationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationListTests { - @Test - public void testDeserialize() { - OperationList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"ownoizhw\",\"properties\":{}},{\"name\":\"bqsoqijg\",\"isDataAction\":true,\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"origin\":\"kwm\",\"properties\":{}},{\"name\":\"siznto\",\"isDataAction\":false,\"display\":{\"provider\":\"uajpsquc\",\"resource\":\"o\",\"operation\":\"dkfo\",\"description\":\"nygj\"},\"origin\":\"jddeqsrdeupewnw\",\"properties\":{}}],\"nextLink\":\"jzyflu\"}") - .toObject(OperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("jzyflu", model.nextLink()); - } - - @Test - public void testSerialize() { - OperationList model = - new OperationList() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("quvgjxpybczme") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("pbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withOrigin("ownoizhw") - .withProperties(new OperationProperties()), - new OperationInner() - .withName("bqsoqijg") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("azlobcufpdznrbt") - .withResource("qjnqglhqgnufoooj") - .withOperation("ifsqesaagdfmg") - .withDescription("lhjxr")) - .withOrigin("kwm") - .withProperties(new OperationProperties()), - new OperationInner() - .withName("siznto") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("uajpsquc") - .withResource("o") - .withOperation("dkfo") - .withDescription("nygj")) - .withOrigin("jddeqsrdeupewnw") - .withProperties(new OperationProperties()))) - .withNextLink("jzyflu"); - model = BinaryData.fromObject(model).toObject(OperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - Assertions.assertEquals("jzyflu", model.nextLink()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationPropertiesTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationPropertiesTests.java deleted file mode 100644 index 43e422a511eb..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,84 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.LogSpecification; -import com.azure.resourcemanager.signalr.models.MetricSpecification; -import com.azure.resourcemanager.signalr.models.OperationProperties; -import com.azure.resourcemanager.signalr.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationPropertiesTests { - @Test - public void testDeserialize() { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"hanufhfcbjysagi\",\"displayName\":\"xqhabi\",\"displayDescription\":\"ikxwc\",\"unit\":\"yscnpqxu\",\"aggregationType\":\"vyq\",\"fillGapWithZero\":\"wby\",\"category\":\"k\",\"dimensions\":[]},{\"name\":\"umjgrtfwvuk\",\"displayName\":\"audccsnhs\",\"displayDescription\":\"nyejhkryhtnap\",\"unit\":\"wlokjyem\",\"aggregationType\":\"vnipjox\",\"fillGapWithZero\":\"nchgej\",\"category\":\"odmailzyd\",\"dimensions\":[]}],\"logSpecifications\":[{\"name\":\"yahux\",\"displayName\":\"pmqnja\"},{\"name\":\"ixjsprozvcputeg\",\"displayName\":\"wmfdatscmdvpjhul\"},{\"name\":\"uvm\",\"displayName\":\"ozkrwfndiodjpslw\"},{\"name\":\"dpvwryoqpsoaccta\",\"displayName\":\"kljla\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("hanufhfcbjysagi", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("ikxwc", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("yscnpqxu", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("vyq", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("wby", model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("k", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("yahux", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("pmqnja", model.serviceSpecification().logSpecifications().get(0).displayName()); - } - - @Test - public void testSerialize() { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("hanufhfcbjysagi") - .withDisplayName("xqhabi") - .withDisplayDescription("ikxwc") - .withUnit("yscnpqxu") - .withAggregationType("vyq") - .withFillGapWithZero("wby") - .withCategory("k") - .withDimensions(Arrays.asList()), - new MetricSpecification() - .withName("umjgrtfwvuk") - .withDisplayName("audccsnhs") - .withDisplayDescription("nyejhkryhtnap") - .withUnit("wlokjyem") - .withAggregationType("vnipjox") - .withFillGapWithZero("nchgej") - .withCategory("odmailzyd") - .withDimensions(Arrays.asList()))) - .withLogSpecifications( - Arrays - .asList( - new LogSpecification().withName("yahux").withDisplayName("pmqnja"), - new LogSpecification() - .withName("ixjsprozvcputeg") - .withDisplayName("wmfdatscmdvpjhul"), - new LogSpecification().withName("uvm").withDisplayName("ozkrwfndiodjpslw"), - new LogSpecification().withName("dpvwryoqpsoaccta").withDisplayName("kljla")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("hanufhfcbjysagi", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("ikxwc", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("yscnpqxu", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("vyq", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("wby", model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("k", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("yahux", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("pmqnja", model.serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationsListMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationsListMockTests.java deleted file mode 100644 index 947566c69f25..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/OperationsListMockTests.java +++ /dev/null @@ -1,74 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"kotl\",\"isDataAction\":false,\"display\":{\"provider\":\"gsyocogj\",\"resource\":\"dtbnnha\",\"operation\":\"ocrkvcikh\",\"description\":\"p\"},\"origin\":\"qgxqquezikyw\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[],\"logSpecifications\":[]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(Context.NONE); - - Assertions.assertEquals("kotl", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("gsyocogj", response.iterator().next().display().provider()); - Assertions.assertEquals("dtbnnha", response.iterator().next().display().resource()); - Assertions.assertEquals("ocrkvcikh", response.iterator().next().display().operation()); - Assertions.assertEquals("p", response.iterator().next().display().description()); - Assertions.assertEquals("qgxqquezikyw", response.iterator().next().origin()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointAclTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointAclTests.java deleted file mode 100644 index a290efebe6b3..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointAclTests.java +++ /dev/null @@ -1,44 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.PrivateEndpointAcl; -import com.azure.resourcemanager.signalr.models.SignalRRequestType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointAclTests { - @Test - public void testDeserialize() { - PrivateEndpointAcl model = - BinaryData - .fromString( - "{\"name\":\"zvszj\",\"allow\":[\"ServerConnection\",\"ClientConnection\",\"Trace\"],\"deny\":[\"ServerConnection\",\"ServerConnection\"]}") - .toObject(PrivateEndpointAcl.class); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.allow().get(0)); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.deny().get(0)); - Assertions.assertEquals("zvszj", model.name()); - } - - @Test - public void testSerialize() { - PrivateEndpointAcl model = - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - SignalRRequestType.SERVER_CONNECTION, - SignalRRequestType.CLIENT_CONNECTION, - SignalRRequestType.TRACE)) - .withDeny(Arrays.asList(SignalRRequestType.SERVER_CONNECTION, SignalRRequestType.SERVER_CONNECTION)) - .withName("zvszj"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointAcl.class); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.allow().get(0)); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.deny().get(0)); - Assertions.assertEquals("zvszj", model.name()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index da1eec64f673..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,49 +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.generated; - -import com.azure.core.util.BinaryData; -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; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionInnerTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{\"id\":\"nxdhbt\"},\"groupIds\":[\"h\",\"wpn\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"nermcl\",\"actionsRequired\":\"lphox\"}},\"id\":\"scrpabgyepsbjt\",\"name\":\"zq\",\"type\":\"gxywpmue\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("nxdhbt", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("nermcl", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lphox", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("nxdhbt")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REJECTED) - .withDescription("nermcl") - .withActionsRequired("lphox")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("nxdhbt", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("nermcl", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lphox", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionListTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionListTests.java deleted file mode 100644 index d3abde6b0953..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionListTests.java +++ /dev/null @@ -1,34 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.signalr.models.PrivateEndpointConnectionList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionListTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"groupIds\":[]},\"id\":\"kwobdagxtibq\",\"name\":\"xbxwa\",\"type\":\"bogqxndlkzgxhu\"}],\"nextLink\":\"plbpodxun\"}") - .toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("plbpodxun", model.nextLink()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionList model = - new PrivateEndpointConnectionList() - .withValue(Arrays.asList(new PrivateEndpointConnectionInner())) - .withNextLink("plbpodxun"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("plbpodxun", model.nextLink()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 7b82aef792d2..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,49 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.signalr.models.PrivateEndpoint; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionPropertiesTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Unknown\",\"privateEndpoint\":{\"id\":\"fqkquj\"},\"groupIds\":[\"uyonobglaoc\",\"xtccmg\",\"udxytlmoyrx\",\"wfudwpzntxhdzhl\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ck\",\"actionsRequired\":\"lhrxsbkyvpyc\"}}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("fqkquj", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ck", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lhrxsbkyvpyc", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint().withId("fqkquj")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.PENDING) - .withDescription("ck") - .withActionsRequired("lhrxsbkyvpyc")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("fqkquj", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ck", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lhrxsbkyvpyc", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointTests.java deleted file mode 100644 index 981db940680a..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointTests { - @Test - public void testDeserialize() { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"uzbpzkafku\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("uzbpzkafku", model.id()); - } - - @Test - public void testSerialize() { - PrivateEndpoint model = new PrivateEndpoint().withId("uzbpzkafku"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("uzbpzkafku", model.id()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index 7ae6cb8a635b..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,46 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourceInnerTests { - @Test - public void testDeserialize() { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"zzewkfvhqcrai\",\"requiredMembers\":[\"n\",\"pfuflrw\"],\"requiredZoneNames\":[\"dlxyjrxs\",\"gafcnihgwqapnedg\",\"bcvkcvqvpkeq\",\"cvdrhvoodsot\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"dopcjwvnh\"},{\"name\":\"wmgxcxrsl\"}]},\"id\":\"utwu\",\"name\":\"egrpkhj\",\"type\":\"niyqslui\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("zzewkfvhqcrai", model.groupId()); - Assertions.assertEquals("n", model.requiredMembers().get(0)); - Assertions.assertEquals("dlxyjrxs", model.requiredZoneNames().get(0)); - Assertions.assertEquals("dopcjwvnh", model.shareablePrivateLinkResourceTypes().get(0).name()); - } - - @Test - public void testSerialize() { - PrivateLinkResourceInner model = - new PrivateLinkResourceInner() - .withGroupId("zzewkfvhqcrai") - .withRequiredMembers(Arrays.asList("n", "pfuflrw")) - .withRequiredZoneNames(Arrays.asList("dlxyjrxs", "gafcnihgwqapnedg", "bcvkcvqvpkeq", "cvdrhvoodsot")) - .withShareablePrivateLinkResourceTypes( - Arrays - .asList( - new ShareablePrivateLinkResourceType().withName("dopcjwvnh"), - new ShareablePrivateLinkResourceType().withName("wmgxcxrsl"))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("zzewkfvhqcrai", model.groupId()); - Assertions.assertEquals("n", model.requiredMembers().get(0)); - Assertions.assertEquals("dlxyjrxs", model.requiredZoneNames().get(0)); - Assertions.assertEquals("dopcjwvnh", model.shareablePrivateLinkResourceTypes().get(0).name()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceListTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceListTests.java deleted file mode 100644 index 7c42f14cbd8f..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourceListTests.java +++ /dev/null @@ -1,53 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.signalr.models.PrivateLinkResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourceListTests { - @Test - public void testDeserialize() { - PrivateLinkResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"mubyynt\",\"requiredMembers\":[],\"requiredZoneNames\":[],\"shareablePrivateLinkResourceTypes\":[]},\"id\":\"qtkoievs\",\"name\":\"otgqrlltmu\",\"type\":\"lauwzizxbmpgcjef\"},{\"properties\":{\"groupId\":\"uvpb\",\"requiredMembers\":[],\"requiredZoneNames\":[],\"shareablePrivateLinkResourceTypes\":[]},\"id\":\"morppxebmnzbtbh\",\"name\":\"pglkf\",\"type\":\"ohdneuel\"},{\"properties\":{\"groupId\":\"sdyhtozfikdowwq\",\"requiredMembers\":[],\"requiredZoneNames\":[],\"shareablePrivateLinkResourceTypes\":[]},\"id\":\"zx\",\"name\":\"lvithhqzonosgg\",\"type\":\"hcohfwdsjnk\"}],\"nextLink\":\"jutiiswacff\"}") - .toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("mubyynt", model.value().get(0).groupId()); - Assertions.assertEquals("jutiiswacff", model.nextLink()); - } - - @Test - public void testSerialize() { - PrivateLinkResourceList model = - new PrivateLinkResourceList() - .withValue( - Arrays - .asList( - new PrivateLinkResourceInner() - .withGroupId("mubyynt") - .withRequiredMembers(Arrays.asList()) - .withRequiredZoneNames(Arrays.asList()) - .withShareablePrivateLinkResourceTypes(Arrays.asList()), - new PrivateLinkResourceInner() - .withGroupId("uvpb") - .withRequiredMembers(Arrays.asList()) - .withRequiredZoneNames(Arrays.asList()) - .withShareablePrivateLinkResourceTypes(Arrays.asList()), - new PrivateLinkResourceInner() - .withGroupId("sdyhtozfikdowwq") - .withRequiredMembers(Arrays.asList()) - .withRequiredZoneNames(Arrays.asList()) - .withShareablePrivateLinkResourceTypes(Arrays.asList()))) - .withNextLink("jutiiswacff"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("mubyynt", model.value().get(0).groupId()); - Assertions.assertEquals("jutiiswacff", model.nextLink()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourcePropertiesTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 47e4d4cac17e..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,60 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.PrivateLinkResourceProperties; -import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceProperties; -import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourcePropertiesTests { - @Test - public void testDeserialize() { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"dggkzzlvmbmpa\",\"requiredMembers\":[\"dfvue\",\"yw\",\"bpfvm\"],\"requiredZoneNames\":[\"rfouyftaakcpw\",\"yzvqt\"],\"shareablePrivateLinkResourceTypes\":[{\"name\":\"exkpzksmondjmq\",\"properties\":{\"description\":\"ypomgkopkwho\",\"groupId\":\"pajqgxysm\",\"type\":\"mbqfqvmk\"}}]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("dggkzzlvmbmpa", model.groupId()); - Assertions.assertEquals("dfvue", model.requiredMembers().get(0)); - Assertions.assertEquals("rfouyftaakcpw", model.requiredZoneNames().get(0)); - Assertions.assertEquals("exkpzksmondjmq", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals("ypomgkopkwho", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions.assertEquals("pajqgxysm", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions.assertEquals("mbqfqvmk", model.shareablePrivateLinkResourceTypes().get(0).properties().type()); - } - - @Test - public void testSerialize() { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties() - .withGroupId("dggkzzlvmbmpa") - .withRequiredMembers(Arrays.asList("dfvue", "yw", "bpfvm")) - .withRequiredZoneNames(Arrays.asList("rfouyftaakcpw", "yzvqt")) - .withShareablePrivateLinkResourceTypes( - Arrays - .asList( - new ShareablePrivateLinkResourceType() - .withName("exkpzksmondjmq") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("ypomgkopkwho") - .withGroupId("pajqgxysm") - .withType("mbqfqvmk")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("dggkzzlvmbmpa", model.groupId()); - Assertions.assertEquals("dfvue", model.requiredMembers().get(0)); - Assertions.assertEquals("rfouyftaakcpw", model.requiredZoneNames().get(0)); - Assertions.assertEquals("exkpzksmondjmq", model.shareablePrivateLinkResourceTypes().get(0).name()); - Assertions - .assertEquals("ypomgkopkwho", model.shareablePrivateLinkResourceTypes().get(0).properties().description()); - Assertions.assertEquals("pajqgxysm", model.shareablePrivateLinkResourceTypes().get(0).properties().groupId()); - Assertions.assertEquals("mbqfqvmk", model.shareablePrivateLinkResourceTypes().get(0).properties().type()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index a1cef35610de..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,38 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkServiceConnectionStateTests { - @Test - public void testDeserialize() { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString( - "{\"status\":\"Approved\",\"description\":\"nwbmeh\",\"actionsRequired\":\"eyvjusrtslhspkde\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("nwbmeh", model.description()); - Assertions.assertEquals("eyvjusrtslhspkde", model.actionsRequired()); - } - - @Test - public void testSerialize() { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("nwbmeh") - .withActionsRequired("eyvjusrtslhspkde"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("nwbmeh", model.description()); - Assertions.assertEquals("eyvjusrtslhspkde", model.actionsRequired()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogCategoryTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogCategoryTests.java deleted file mode 100644 index f41cd780550b..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogCategoryTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ResourceLogCategory; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceLogCategoryTests { - @Test - public void testDeserialize() { - ResourceLogCategory model = - BinaryData.fromString("{\"name\":\"ibycno\",\"enabled\":\"knme\"}").toObject(ResourceLogCategory.class); - Assertions.assertEquals("ibycno", model.name()); - Assertions.assertEquals("knme", model.enabled()); - } - - @Test - public void testSerialize() { - ResourceLogCategory model = new ResourceLogCategory().withName("ibycno").withEnabled("knme"); - model = BinaryData.fromObject(model).toObject(ResourceLogCategory.class); - Assertions.assertEquals("ibycno", model.name()); - Assertions.assertEquals("knme", model.enabled()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogConfigurationTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogConfigurationTests.java deleted file mode 100644 index db167c6ad8ca..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceLogConfigurationTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ResourceLogCategory; -import com.azure.resourcemanager.signalr.models.ResourceLogConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceLogConfigurationTests { - @Test - public void testDeserialize() { - ResourceLogConfiguration model = - BinaryData - .fromString( - "{\"categories\":[{\"name\":\"gibtnm\",\"enabled\":\"ebwwaloayqc\"},{\"name\":\"rtzju\",\"enabled\":\"wyzmhtxon\"},{\"name\":\"ts\",\"enabled\":\"jcbpwxqpsrknft\"},{\"name\":\"vriuhprwmdyvx\",\"enabled\":\"ayriwwroyqbexrm\"}]}") - .toObject(ResourceLogConfiguration.class); - Assertions.assertEquals("gibtnm", model.categories().get(0).name()); - Assertions.assertEquals("ebwwaloayqc", model.categories().get(0).enabled()); - } - - @Test - public void testSerialize() { - ResourceLogConfiguration model = - new ResourceLogConfiguration() - .withCategories( - Arrays - .asList( - new ResourceLogCategory().withName("gibtnm").withEnabled("ebwwaloayqc"), - new ResourceLogCategory().withName("rtzju").withEnabled("wyzmhtxon"), - new ResourceLogCategory().withName("ts").withEnabled("jcbpwxqpsrknft"), - new ResourceLogCategory().withName("vriuhprwmdyvx").withEnabled("ayriwwroyqbexrm"))); - model = BinaryData.fromObject(model).toObject(ResourceLogConfiguration.class); - Assertions.assertEquals("gibtnm", model.categories().get(0).name()); - Assertions.assertEquals("ebwwaloayqc", model.categories().get(0).enabled()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceReferenceTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceReferenceTests.java deleted file mode 100644 index a48d6ea82819..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceReferenceTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ResourceReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceReferenceTests { - @Test - public void testDeserialize() { - ResourceReference model = BinaryData.fromString("{\"id\":\"gaokonzmnsikv\"}").toObject(ResourceReference.class); - Assertions.assertEquals("gaokonzmnsikv", model.id()); - } - - @Test - public void testSerialize() { - ResourceReference model = new ResourceReference().withId("gaokonzmnsikv"); - model = BinaryData.fromObject(model).toObject(ResourceReference.class); - Assertions.assertEquals("gaokonzmnsikv", model.id()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceSkuTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceSkuTests.java deleted file mode 100644 index a8dd6589d5ac..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ResourceSkuTests.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ResourceSku; -import com.azure.resourcemanager.signalr.models.SignalRSkuTier; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceSkuTests { - @Test - public void testDeserialize() { - ResourceSku model = - BinaryData - .fromString( - "{\"name\":\"burvjxxjnspy\",\"tier\":\"Free\",\"size\":\"oenkouknvudwti\",\"family\":\"bldngkpoc\",\"capacity\":523665642}") - .toObject(ResourceSku.class); - Assertions.assertEquals("burvjxxjnspy", model.name()); - Assertions.assertEquals(SignalRSkuTier.FREE, model.tier()); - Assertions.assertEquals(523665642, model.capacity()); - } - - @Test - public void testSerialize() { - ResourceSku model = - new ResourceSku().withName("burvjxxjnspy").withTier(SignalRSkuTier.FREE).withCapacity(523665642); - model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals("burvjxxjnspy", model.name()); - Assertions.assertEquals(SignalRSkuTier.FREE, model.tier()); - Assertions.assertEquals(523665642, model.capacity()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessSettingsTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessSettingsTests.java deleted file mode 100644 index 8a00656969db..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessSettingsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ServerlessSettings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ServerlessSettingsTests { - @Test - public void testDeserialize() { - ServerlessSettings model = - BinaryData.fromString("{\"connectionTimeoutInSeconds\":1596436522}").toObject(ServerlessSettings.class); - Assertions.assertEquals(1596436522, model.connectionTimeoutInSeconds()); - } - - @Test - public void testSerialize() { - ServerlessSettings model = new ServerlessSettings().withConnectionTimeoutInSeconds(1596436522); - model = BinaryData.fromObject(model).toObject(ServerlessSettings.class); - Assertions.assertEquals(1596436522, model.connectionTimeoutInSeconds()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessUpstreamSettingsTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessUpstreamSettingsTests.java deleted file mode 100644 index fbb3cfcfab24..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServerlessUpstreamSettingsTests.java +++ /dev/null @@ -1,63 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ServerlessUpstreamSettings; -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 org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ServerlessUpstreamSettingsTests { - @Test - public void testDeserialize() { - ServerlessUpstreamSettings model = - BinaryData - .fromString( - "{\"templates\":[{\"hubPattern\":\"zunlu\",\"eventPattern\":\"nnprn\",\"categoryPattern\":\"peilpjzuaejxdu\",\"urlTemplate\":\"tskzbbtdzumveek\",\"auth\":{\"type\":\"None\"}},{\"hubPattern\":\"hkfpbs\",\"eventPattern\":\"ofd\",\"categoryPattern\":\"uusdttouwa\",\"urlTemplate\":\"oekqvk\",\"auth\":{\"type\":\"None\"}},{\"hubPattern\":\"bxwyjsflhhcaa\",\"eventPattern\":\"jixisxyawjoyaqcs\",\"categoryPattern\":\"jpkiidzyexznelix\",\"urlTemplate\":\"nr\",\"auth\":{\"type\":\"None\"}}]}") - .toObject(ServerlessUpstreamSettings.class); - Assertions.assertEquals("zunlu", model.templates().get(0).hubPattern()); - Assertions.assertEquals("nnprn", model.templates().get(0).eventPattern()); - Assertions.assertEquals("peilpjzuaejxdu", model.templates().get(0).categoryPattern()); - Assertions.assertEquals("tskzbbtdzumveek", model.templates().get(0).urlTemplate()); - Assertions.assertEquals(UpstreamAuthType.NONE, model.templates().get(0).auth().type()); - } - - @Test - public void testSerialize() { - ServerlessUpstreamSettings model = - new ServerlessUpstreamSettings() - .withTemplates( - Arrays - .asList( - new UpstreamTemplate() - .withHubPattern("zunlu") - .withEventPattern("nnprn") - .withCategoryPattern("peilpjzuaejxdu") - .withUrlTemplate("tskzbbtdzumveek") - .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.NONE)), - new UpstreamTemplate() - .withHubPattern("hkfpbs") - .withEventPattern("ofd") - .withCategoryPattern("uusdttouwa") - .withUrlTemplate("oekqvk") - .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.NONE)), - new UpstreamTemplate() - .withHubPattern("bxwyjsflhhcaa") - .withEventPattern("jixisxyawjoyaqcs") - .withCategoryPattern("jpkiidzyexznelix") - .withUrlTemplate("nr") - .withAuth(new UpstreamAuthSettings().withType(UpstreamAuthType.NONE)))); - model = BinaryData.fromObject(model).toObject(ServerlessUpstreamSettings.class); - Assertions.assertEquals("zunlu", model.templates().get(0).hubPattern()); - Assertions.assertEquals("nnprn", model.templates().get(0).eventPattern()); - Assertions.assertEquals("peilpjzuaejxdu", model.templates().get(0).categoryPattern()); - Assertions.assertEquals("tskzbbtdzumveek", model.templates().get(0).urlTemplate()); - Assertions.assertEquals(UpstreamAuthType.NONE, model.templates().get(0).auth().type()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServiceSpecificationTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServiceSpecificationTests.java deleted file mode 100644 index e7b486011814..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,64 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.LogSpecification; -import com.azure.resourcemanager.signalr.models.MetricSpecification; -import com.azure.resourcemanager.signalr.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ServiceSpecificationTests { - @Test - public void testDeserialize() { - ServiceSpecification model = - BinaryData - .fromString( - "{\"metricSpecifications\":[{\"name\":\"yffdfdos\",\"displayName\":\"expa\",\"displayDescription\":\"akhmsbzjhcrz\",\"unit\":\"dphlxaolt\",\"aggregationType\":\"trg\",\"fillGapWithZero\":\"bpf\",\"category\":\"s\",\"dimensions\":[]}],\"logSpecifications\":[{\"name\":\"cjrwzoxxjtfellu\",\"displayName\":\"zitonpeqfpjkjl\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("yffdfdos", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("expa", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("akhmsbzjhcrz", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("dphlxaolt", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("trg", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("bpf", model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("s", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.logSpecifications().get(0).name()); - Assertions.assertEquals("zitonpeqfpjkjl", model.logSpecifications().get(0).displayName()); - } - - @Test - public void testSerialize() { - ServiceSpecification model = - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("yffdfdos") - .withDisplayName("expa") - .withDisplayDescription("akhmsbzjhcrz") - .withUnit("dphlxaolt") - .withAggregationType("trg") - .withFillGapWithZero("bpf") - .withCategory("s") - .withDimensions(Arrays.asList()))) - .withLogSpecifications( - Arrays - .asList(new LogSpecification().withName("cjrwzoxxjtfellu").withDisplayName("zitonpeqfpjkjl"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("yffdfdos", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("expa", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("akhmsbzjhcrz", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("dphlxaolt", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("trg", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("bpf", model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("s", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("cjrwzoxxjtfellu", model.logSpecifications().get(0).name()); - Assertions.assertEquals("zitonpeqfpjkjl", model.logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourcePropertiesTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 1c9b07c8c0ed..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,36 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ShareablePrivateLinkResourcePropertiesTests { - @Test - public void testDeserialize() { - ShareablePrivateLinkResourceProperties model = - BinaryData - .fromString("{\"description\":\"qrhzoymibmrqyib\",\"groupId\":\"wfluszdt\",\"type\":\"rkwofyyvoqa\"}") - .toObject(ShareablePrivateLinkResourceProperties.class); - Assertions.assertEquals("qrhzoymibmrqyib", model.description()); - Assertions.assertEquals("wfluszdt", model.groupId()); - Assertions.assertEquals("rkwofyyvoqa", model.type()); - } - - @Test - public void testSerialize() { - ShareablePrivateLinkResourceProperties model = - new ShareablePrivateLinkResourceProperties() - .withDescription("qrhzoymibmrqyib") - .withGroupId("wfluszdt") - .withType("rkwofyyvoqa"); - model = BinaryData.fromObject(model).toObject(ShareablePrivateLinkResourceProperties.class); - Assertions.assertEquals("qrhzoymibmrqyib", model.description()); - Assertions.assertEquals("wfluszdt", model.groupId()); - Assertions.assertEquals("rkwofyyvoqa", model.type()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourceTypeTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourceTypeTests.java deleted file mode 100644 index 8ee2d51e8949..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/ShareablePrivateLinkResourceTypeTests.java +++ /dev/null @@ -1,43 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceProperties; -import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ShareablePrivateLinkResourceTypeTests { - @Test - public void testDeserialize() { - ShareablePrivateLinkResourceType model = - BinaryData - .fromString( - "{\"name\":\"oz\",\"properties\":{\"description\":\"helxprglya\",\"groupId\":\"dckcbc\",\"type\":\"jrjxgciqibrhosx\"}}") - .toObject(ShareablePrivateLinkResourceType.class); - Assertions.assertEquals("oz", model.name()); - Assertions.assertEquals("helxprglya", model.properties().description()); - Assertions.assertEquals("dckcbc", model.properties().groupId()); - Assertions.assertEquals("jrjxgciqibrhosx", model.properties().type()); - } - - @Test - public void testSerialize() { - ShareablePrivateLinkResourceType model = - new ShareablePrivateLinkResourceType() - .withName("oz") - .withProperties( - new ShareablePrivateLinkResourceProperties() - .withDescription("helxprglya") - .withGroupId("dckcbc") - .withType("jrjxgciqibrhosx")); - model = BinaryData.fromObject(model).toObject(ShareablePrivateLinkResourceType.class); - Assertions.assertEquals("oz", model.name()); - Assertions.assertEquals("helxprglya", model.properties().description()); - Assertions.assertEquals("dckcbc", model.properties().groupId()); - Assertions.assertEquals("jrjxgciqibrhosx", model.properties().type()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceInnerTests.java deleted file mode 100644 index 854e8108c526..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SharedPrivateLinkResourceInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SharedPrivateLinkResourceInnerTests { - @Test - public void testDeserialize() { - SharedPrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"ofmxagkvtmelmqkr\",\"privateLinkResourceId\":\"ahvljuaha\",\"provisioningState\":\"Creating\",\"requestMessage\":\"dhmdua\",\"status\":\"Disconnected\"},\"id\":\"xqpvfadmw\",\"name\":\"rcrgvx\",\"type\":\"vgomz\"}") - .toObject(SharedPrivateLinkResourceInner.class); - Assertions.assertEquals("ofmxagkvtmelmqkr", model.groupId()); - Assertions.assertEquals("ahvljuaha", model.privateLinkResourceId()); - Assertions.assertEquals("dhmdua", model.requestMessage()); - } - - @Test - public void testSerialize() { - SharedPrivateLinkResourceInner model = - new SharedPrivateLinkResourceInner() - .withGroupId("ofmxagkvtmelmqkr") - .withPrivateLinkResourceId("ahvljuaha") - .withRequestMessage("dhmdua"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceInner.class); - Assertions.assertEquals("ofmxagkvtmelmqkr", model.groupId()); - Assertions.assertEquals("ahvljuaha", model.privateLinkResourceId()); - Assertions.assertEquals("dhmdua", model.requestMessage()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceListTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceListTests.java deleted file mode 100644 index b9104555ed03..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourceListTests.java +++ /dev/null @@ -1,54 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SharedPrivateLinkResourceInner; -import com.azure.resourcemanager.signalr.models.SharedPrivateLinkResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SharedPrivateLinkResourceListTests { - @Test - public void testDeserialize() { - SharedPrivateLinkResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"tg\",\"privateLinkResourceId\":\"wbwo\",\"provisioningState\":\"Canceled\",\"requestMessage\":\"shrtdtkcnqxwb\",\"status\":\"Approved\"},\"id\":\"ulpiuj\",\"name\":\"aasipqi\",\"type\":\"obyu\"},{\"properties\":{\"groupId\":\"pqlpq\",\"privateLinkResourceId\":\"cciuqgbdbutau\",\"provisioningState\":\"Running\",\"requestMessage\":\"kuwhh\",\"status\":\"Approved\"},\"id\":\"k\",\"name\":\"joxafnndlpi\",\"type\":\"hkoymkcdyhbp\"},{\"properties\":{\"groupId\":\"wdreqnovvqfovl\",\"privateLinkResourceId\":\"xywsuws\",\"provisioningState\":\"Running\",\"requestMessage\":\"dsytgadgvr\",\"status\":\"Pending\"},\"id\":\"en\",\"name\":\"qnzarrwl\",\"type\":\"uu\"}],\"nextLink\":\"fqka\"}") - .toObject(SharedPrivateLinkResourceList.class); - Assertions.assertEquals("tg", model.value().get(0).groupId()); - Assertions.assertEquals("wbwo", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("shrtdtkcnqxwb", model.value().get(0).requestMessage()); - Assertions.assertEquals("fqka", model.nextLink()); - } - - @Test - public void testSerialize() { - SharedPrivateLinkResourceList model = - new SharedPrivateLinkResourceList() - .withValue( - Arrays - .asList( - new SharedPrivateLinkResourceInner() - .withGroupId("tg") - .withPrivateLinkResourceId("wbwo") - .withRequestMessage("shrtdtkcnqxwb"), - new SharedPrivateLinkResourceInner() - .withGroupId("pqlpq") - .withPrivateLinkResourceId("cciuqgbdbutau") - .withRequestMessage("kuwhh"), - new SharedPrivateLinkResourceInner() - .withGroupId("wdreqnovvqfovl") - .withPrivateLinkResourceId("xywsuws") - .withRequestMessage("dsytgadgvr"))) - .withNextLink("fqka"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceList.class); - Assertions.assertEquals("tg", model.value().get(0).groupId()); - Assertions.assertEquals("wbwo", model.value().get(0).privateLinkResourceId()); - Assertions.assertEquals("shrtdtkcnqxwb", model.value().get(0).requestMessage()); - Assertions.assertEquals("fqka", model.nextLink()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourcePropertiesTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourcePropertiesTests.java deleted file mode 100644 index c9d935df447f..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SharedPrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SharedPrivateLinkResourceProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SharedPrivateLinkResourcePropertiesTests { - @Test - public void testDeserialize() { - SharedPrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"fmisg\",\"privateLinkResourceId\":\"bnbbeldawkz\",\"provisioningState\":\"Running\",\"requestMessage\":\"ourqhakau\",\"status\":\"Approved\"}") - .toObject(SharedPrivateLinkResourceProperties.class); - Assertions.assertEquals("fmisg", model.groupId()); - Assertions.assertEquals("bnbbeldawkz", model.privateLinkResourceId()); - Assertions.assertEquals("ourqhakau", model.requestMessage()); - } - - @Test - public void testSerialize() { - SharedPrivateLinkResourceProperties model = - new SharedPrivateLinkResourceProperties() - .withGroupId("fmisg") - .withPrivateLinkResourceId("bnbbeldawkz") - .withRequestMessage("ourqhakau"); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperties.class); - Assertions.assertEquals("fmisg", model.groupId()); - Assertions.assertEquals("bnbbeldawkz", model.privateLinkResourceId()); - Assertions.assertEquals("ourqhakau", model.requestMessage()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCorsSettingsTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCorsSettingsTests.java deleted file mode 100644 index 992027e161f3..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCorsSettingsTests.java +++ /dev/null @@ -1,31 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.SignalRCorsSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRCorsSettingsTests { - @Test - public void testDeserialize() { - SignalRCorsSettings model = - BinaryData - .fromString("{\"allowedOrigins\":[\"gzva\",\"apj\",\"zhpvgqzcjrvxd\",\"zlmwlxkvugfhz\"]}") - .toObject(SignalRCorsSettings.class); - Assertions.assertEquals("gzva", model.allowedOrigins().get(0)); - } - - @Test - public void testSerialize() { - SignalRCorsSettings model = - new SignalRCorsSettings() - .withAllowedOrigins(Arrays.asList("gzva", "apj", "zhpvgqzcjrvxd", "zlmwlxkvugfhz")); - model = BinaryData.fromObject(model).toObject(SignalRCorsSettings.class); - Assertions.assertEquals("gzva", model.allowedOrigins().get(0)); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomCertificatesDeleteWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index bdd8bbcf8e75..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRCustomCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .signalRCustomCertificates() - .deleteWithResponse("ffhmouwqlgzr", "zeeyebi", "ikayuhqlbjbsybb", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsDeleteMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsDeleteMockTests.java deleted file mode 100644 index 542755ae3e70..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsDeleteMockTests.java +++ /dev/null @@ -1,62 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRCustomDomainsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.signalRCustomDomains().delete("ughftqsx", "qxujxukndxd", "grjguufzd", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsGetWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsGetWithResponseMockTests.java deleted file mode 100644 index e3bf07126315..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.CustomDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRCustomDomainsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\",\"domainName\":\"feljagrqm\",\"customCertificate\":{\"id\":\"ldvriiiojnalghfk\"}},\"id\":\"tvsexsowuel\",\"name\":\"qhhahhxvrhmzkwpj\",\"type\":\"wws\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CustomDomain response = - manager - .signalRCustomDomains() - .getWithResponse("zszrnwoiindfpw", "jylwbtlhflsj", "dhszfjv", Context.NONE) - .getValue(); - - Assertions.assertEquals("feljagrqm", response.domainName()); - Assertions.assertEquals("ldvriiiojnalghfk", response.customCertificate().id()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsListMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsListMockTests.java deleted file mode 100644 index 399fda670e5e..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRCustomDomainsListMockTests.java +++ /dev/null @@ -1,70 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.CustomDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRCustomDomainsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"domainName\":\"kpzi\",\"customCertificate\":{\"id\":\"j\"}},\"id\":\"anlfzxiavrmbz\",\"name\":\"nokixrjqcirgz\",\"type\":\"frl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.signalRCustomDomains().list("pdrhne", "yowqkdwytisibir", Context.NONE); - - Assertions.assertEquals("kpzi", response.iterator().next().domainName()); - Assertions.assertEquals("j", response.iterator().next().customCertificate().id()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRFeatureTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRFeatureTests.java deleted file mode 100644 index 86dc452763f0..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRFeatureTests.java +++ /dev/null @@ -1,51 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.FeatureFlags; -import com.azure.resourcemanager.signalr.models.SignalRFeature; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRFeatureTests { - @Test - public void testDeserialize() { - SignalRFeature model = - BinaryData - .fromString( - "{\"flag\":\"EnableMessagingLogs\",\"value\":\"wxosowzxcug\",\"properties\":{\"wfvovbv\":\"ooxdjebwpuc\",\"jrwjueiotwm\":\"euecivyhzceuoj\",\"rjaw\":\"dytdxwitx\"}}") - .toObject(SignalRFeature.class); - Assertions.assertEquals(FeatureFlags.ENABLE_MESSAGING_LOGS, model.flag()); - Assertions.assertEquals("wxosowzxcug", model.value()); - Assertions.assertEquals("ooxdjebwpuc", model.properties().get("wfvovbv")); - } - - @Test - public void testSerialize() { - SignalRFeature model = - new SignalRFeature() - .withFlag(FeatureFlags.ENABLE_MESSAGING_LOGS) - .withValue("wxosowzxcug") - .withProperties(mapOf("wfvovbv", "ooxdjebwpuc", "jrwjueiotwm", "euecivyhzceuoj", "rjaw", "dytdxwitx")); - model = BinaryData.fromObject(model).toObject(SignalRFeature.class); - Assertions.assertEquals(FeatureFlags.ENABLE_MESSAGING_LOGS, model.flag()); - Assertions.assertEquals("wxosowzxcug", model.value()); - Assertions.assertEquals("ooxdjebwpuc", model.properties().get("wfvovbv")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRNetworkACLsTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRNetworkACLsTests.java deleted file mode 100644 index 42711e175e1b..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRNetworkACLsTests.java +++ /dev/null @@ -1,85 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.AclAction; -import com.azure.resourcemanager.signalr.models.NetworkAcl; -import com.azure.resourcemanager.signalr.models.PrivateEndpointAcl; -import com.azure.resourcemanager.signalr.models.SignalRNetworkACLs; -import com.azure.resourcemanager.signalr.models.SignalRRequestType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRNetworkACLsTests { - @Test - public void testDeserialize() { - SignalRNetworkACLs model = - BinaryData - .fromString( - "{\"defaultAction\":\"Allow\",\"publicNetwork\":{\"allow\":[\"RESTAPI\",\"RESTAPI\"],\"deny\":[\"ServerConnection\"]},\"privateEndpoints\":[{\"name\":\"xolzdahzx\",\"allow\":[\"Trace\",\"RESTAPI\",\"ServerConnection\"],\"deny\":[\"ServerConnection\",\"Trace\",\"ServerConnection\"]},{\"name\":\"zpostmgrcfbu\",\"allow\":[\"Trace\",\"RESTAPI\",\"ServerConnection\"],\"deny\":[\"ServerConnection\",\"RESTAPI\"]},{\"name\":\"bpvjymjhx\",\"allow\":[\"ClientConnection\",\"Trace\"],\"deny\":[\"ServerConnection\",\"ClientConnection\"]}]}") - .toObject(SignalRNetworkACLs.class); - Assertions.assertEquals(AclAction.ALLOW, model.defaultAction()); - Assertions.assertEquals(SignalRRequestType.RESTAPI, model.publicNetwork().allow().get(0)); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.publicNetwork().deny().get(0)); - Assertions.assertEquals(SignalRRequestType.TRACE, model.privateEndpoints().get(0).allow().get(0)); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("xolzdahzx", model.privateEndpoints().get(0).name()); - } - - @Test - public void testSerialize() { - SignalRNetworkACLs model = - new SignalRNetworkACLs() - .withDefaultAction(AclAction.ALLOW) - .withPublicNetwork( - new NetworkAcl() - .withAllow(Arrays.asList(SignalRRequestType.RESTAPI, SignalRRequestType.RESTAPI)) - .withDeny(Arrays.asList(SignalRRequestType.SERVER_CONNECTION))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - SignalRRequestType.TRACE, - SignalRRequestType.RESTAPI, - SignalRRequestType.SERVER_CONNECTION)) - .withDeny( - Arrays - .asList( - SignalRRequestType.SERVER_CONNECTION, - SignalRRequestType.TRACE, - SignalRRequestType.SERVER_CONNECTION)) - .withName("xolzdahzx"), - new PrivateEndpointAcl() - .withAllow( - Arrays - .asList( - SignalRRequestType.TRACE, - SignalRRequestType.RESTAPI, - SignalRRequestType.SERVER_CONNECTION)) - .withDeny( - Arrays.asList(SignalRRequestType.SERVER_CONNECTION, SignalRRequestType.RESTAPI)) - .withName("zpostmgrcfbu"), - new PrivateEndpointAcl() - .withAllow( - Arrays.asList(SignalRRequestType.CLIENT_CONNECTION, SignalRRequestType.TRACE)) - .withDeny( - Arrays - .asList( - SignalRRequestType.SERVER_CONNECTION, SignalRRequestType.CLIENT_CONNECTION)) - .withName("bpvjymjhx"))); - model = BinaryData.fromObject(model).toObject(SignalRNetworkACLs.class); - Assertions.assertEquals(AclAction.ALLOW, model.defaultAction()); - Assertions.assertEquals(SignalRRequestType.RESTAPI, model.publicNetwork().allow().get(0)); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.publicNetwork().deny().get(0)); - Assertions.assertEquals(SignalRRequestType.TRACE, model.privateEndpoints().get(0).allow().get(0)); - Assertions.assertEquals(SignalRRequestType.SERVER_CONNECTION, model.privateEndpoints().get(0).deny().get(0)); - Assertions.assertEquals("xolzdahzx", model.privateEndpoints().get(0).name()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsDeleteMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index 9766ccfd43b3..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,62 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRPrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.signalRPrivateEndpointConnections().delete("jjoqkagf", "sxtta", "gzxnfaazpxdtnk", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 556a2b8ba5b9..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,77 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.PrivateEndpointConnection; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRPrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\",\"privateEndpoint\":{\"id\":\"owepbqpcrfkb\"},\"groupIds\":[\"snjvcdwxlpqekftn\",\"htjsying\",\"fq\",\"tmtdhtmdvypgik\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"w\",\"actionsRequired\":\"irryuzhlh\"}},\"id\":\"joqrvqqaatj\",\"name\":\"nrvgoupmfiibfgg\",\"type\":\"ioolvrwxkvtkkgll\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .signalRPrivateEndpointConnections() - .getWithResponse("mfe", "kerqwkyh", "ob", Context.NONE) - .getValue(); - - Assertions.assertEquals("owepbqpcrfkb", response.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("w", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("irryuzhlh", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsListMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index c5cabd3f5f1c..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsListMockTests.java +++ /dev/null @@ -1,79 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.PrivateEndpointConnection; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRPrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"privateEndpoint\":{\"id\":\"zudphqamvdkfw\"},\"groupIds\":[\"cvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\",\"zcjaesgvvsccy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"fhwygzlvdnkfxus\",\"actionsRequired\":\"dwzrmuh\"}},\"id\":\"pfcqdp\",\"name\":\"qxqvpsvuoymgc\",\"type\":\"elvezrypq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.signalRPrivateEndpointConnections().list("syqtfi", "whbotzingamv", Context.NONE); - - Assertions.assertEquals("zudphqamvdkfw", response.iterator().next().privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals( - "fhwygzlvdnkfxus", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals("dwzrmuh", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsUpdateWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsUpdateWithResponseMockTests.java deleted file mode 100644 index 7d1a14592d23..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateEndpointConnectionsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,91 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.signalr.models.PrivateEndpoint; -import com.azure.resourcemanager.signalr.models.PrivateEndpointConnection; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.signalr.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRPrivateEndpointConnectionsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Moving\",\"privateEndpoint\":{\"id\":\"kxw\"},\"groupIds\":[\"lbqpvuzlmvfelf\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"crpw\",\"actionsRequired\":\"eznoig\"}},\"id\":\"rnjwmw\",\"name\":\"pn\",\"type\":\"saz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .signalRPrivateEndpointConnections() - .updateWithResponse( - "wjygvjayvblmhvk", - "uhbxvvy", - "gsopbyrqufegxu", - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint().withId("lmctlpd")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("ijnhyjsvfycxzbf") - .withActionsRequired("owvrvmtgjqppyos")), - Context.NONE) - .getValue(); - - Assertions.assertEquals("kxw", response.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.DISCONNECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("crpw", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("eznoig", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateLinkResourcesListMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateLinkResourcesListMockTests.java deleted file mode 100644 index 173ee51e1fd7..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPrivateLinkResourcesListMockTests.java +++ /dev/null @@ -1,71 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRPrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"ou\",\"requiredMembers\":[\"rebqaaysjk\"],\"requiredZoneNames\":[\"tnqttezlwfffiak\",\"jpqqmted\"],\"shareablePrivateLinkResourceTypes\":[]},\"id\":\"mjihyeozphv\",\"name\":\"auyqncygupkv\",\"type\":\"p\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.signalRPrivateLinkResources().list("mkqjj", "wuenvr", Context.NONE); - - Assertions.assertEquals("ou", response.iterator().next().groupId()); - Assertions.assertEquals("rebqaaysjk", response.iterator().next().requiredMembers().get(0)); - Assertions.assertEquals("tnqttezlwfffiak", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPropertiesTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPropertiesTests.java deleted file mode 100644 index 4b1b85dbbeed..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRPropertiesTests.java +++ /dev/null @@ -1,182 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SignalRProperties; -import com.azure.resourcemanager.signalr.models.AclAction; -import com.azure.resourcemanager.signalr.models.FeatureFlags; -import com.azure.resourcemanager.signalr.models.LiveTraceCategory; -import com.azure.resourcemanager.signalr.models.LiveTraceConfiguration; -import com.azure.resourcemanager.signalr.models.NetworkAcl; -import com.azure.resourcemanager.signalr.models.PrivateEndpointAcl; -import com.azure.resourcemanager.signalr.models.ResourceLogCategory; -import com.azure.resourcemanager.signalr.models.ResourceLogConfiguration; -import com.azure.resourcemanager.signalr.models.ServerlessSettings; -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.SignalRTlsSettings; -import com.azure.resourcemanager.signalr.models.UpstreamTemplate; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRPropertiesTests { - @Test - public void testDeserialize() { - SignalRProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Running\",\"externalIP\":\"o\",\"hostName\":\"ukgjnpiucgygevq\",\"publicPort\":2000803950,\"serverPort\":561322525,\"version\":\"rbpizc\",\"privateEndpointConnections\":[{\"properties\":{\"provisioningState\":\"Creating\",\"groupIds\":[]},\"id\":\"fyhxde\",\"name\":\"ejzicwifsjtt\",\"type\":\"zfbishcbkhaj\"},{\"properties\":{\"provisioningState\":\"Updating\",\"groupIds\":[]},\"id\":\"hagalpbuxwgipwh\",\"name\":\"nowkgshw\",\"type\":\"nkixzbinj\"},{\"properties\":{\"provisioningState\":\"Running\",\"groupIds\":[]},\"id\":\"wnuzoqftiyqzrnkc\",\"name\":\"vyxlwhzlsicohoqq\",\"type\":\"wvl\"},{\"properties\":{\"provisioningState\":\"Moving\",\"groupIds\":[]},\"id\":\"unmmq\",\"name\":\"gyxzk\",\"type\":\"noc\"}],\"sharedPrivateLinkResources\":[{\"properties\":{\"groupId\":\"yaxuconuqszfkb\",\"privateLinkResourceId\":\"ypewrmjmwvvjekt\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"nhwlrsffrzpwvl\",\"status\":\"Approved\"},\"id\":\"gbiqylihkaet\",\"name\":\"kt\",\"type\":\"fcivfsnkym\"},{\"properties\":{\"groupId\":\"qhjfbebr\",\"privateLinkResourceId\":\"cxerf\",\"provisioningState\":\"Updating\",\"requestMessage\":\"ttxfvjr\",\"status\":\"Pending\"},\"id\":\"phxepcyvahf\",\"name\":\"ljkyqxjvuuj\",\"type\":\"gidokgjljyoxgvcl\"},{\"properties\":{\"groupId\":\"sncghkjeszz\",\"privateLinkResourceId\":\"bijhtxfvgxbf\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"eh\",\"status\":\"Pending\"},\"id\":\"ec\",\"name\":\"godebfqkkrbmpu\",\"type\":\"gr\"}],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"lfbxzpuzycisp\",\"features\":[{\"flag\":\"EnableConnectivityLogs\",\"value\":\"hmgkbrpyy\",\"properties\":{\"drgvtqagn\":\"bnuqqkpik\",\"mebf\":\"uynhijg\",\"zmhjrunmp\":\"iarbutrcvpna\"}},{\"flag\":\"EnableMessagingLogs\",\"value\":\"tdbhrbnla\",\"properties\":{\"ny\":\"myskpbhenbtkcxy\",\"nlqidybyxczf\":\"nrs\"}},{\"flag\":\"EnableMessagingLogs\",\"value\":\"haaxdbabphl\",\"properties\":{\"cocmnyyaztt\":\"lfktsths\",\"edckzywbiexzfey\":\"twwrqp\",\"ujwb\":\"eaxib\"}},{\"flag\":\"EnableLiveTrace\",\"value\":\"walm\",\"properties\":{\"zjancuxr\":\"oxaepd\"}}],\"liveTraceConfiguration\":{\"enabled\":\"bavxbniwdjswzt\",\"categories\":[{\"name\":\"gnxytxhpzxbz\",\"enabled\":\"zabglcuhxwt\"}]},\"resourceLogConfiguration\":{\"categories\":[{\"name\":\"klbb\",\"enabled\":\"plwzbhvgyugu\"}]},\"cors\":{\"allowedOrigins\":[\"kfssxqukkf\",\"l\",\"mg\",\"xnkjzkdesl\"]},\"serverless\":{\"connectionTimeoutInSeconds\":909915522},\"upstream\":{\"templates\":[{\"hubPattern\":\"ighxpk\",\"eventPattern\":\"zb\",\"categoryPattern\":\"uebbaumnyqup\",\"urlTemplate\":\"deoj\"}]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"publicNetwork\":{\"allow\":[\"ClientConnection\",\"Trace\",\"RESTAPI\"],\"deny\":[\"RESTAPI\"]},\"privateEndpoints\":[{\"name\":\"fhvpesaps\",\"allow\":[],\"deny\":[]},{\"name\":\"qmhjjdhtld\",\"allow\":[],\"deny\":[]},{\"name\":\"zxuutkncwscwsvl\",\"allow\":[],\"deny\":[]},{\"name\":\"ogtwrupqsxvnmi\",\"allow\":[],\"deny\":[]}]},\"publicNetworkAccess\":\"ceoveilovno\",\"disableLocalAuth\":false,\"disableAadAuth\":false}") - .toObject(SignalRProperties.class); - Assertions.assertEquals(true, model.tls().clientCertEnabled()); - Assertions.assertEquals(FeatureFlags.ENABLE_CONNECTIVITY_LOGS, model.features().get(0).flag()); - Assertions.assertEquals("hmgkbrpyy", model.features().get(0).value()); - Assertions.assertEquals("bnuqqkpik", model.features().get(0).properties().get("drgvtqagn")); - Assertions.assertEquals("bavxbniwdjswzt", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("gnxytxhpzxbz", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("zabglcuhxwt", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("klbb", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("plwzbhvgyugu", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("kfssxqukkf", model.cors().allowedOrigins().get(0)); - Assertions.assertEquals(909915522, model.serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals("ighxpk", model.upstream().templates().get(0).hubPattern()); - Assertions.assertEquals("zb", model.upstream().templates().get(0).eventPattern()); - Assertions.assertEquals("uebbaumnyqup", model.upstream().templates().get(0).categoryPattern()); - Assertions.assertEquals("deoj", model.upstream().templates().get(0).urlTemplate()); - Assertions.assertEquals(AclAction.DENY, model.networkACLs().defaultAction()); - Assertions - .assertEquals(SignalRRequestType.CLIENT_CONNECTION, model.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(SignalRRequestType.RESTAPI, model.networkACLs().publicNetwork().deny().get(0)); - Assertions.assertEquals("fhvpesaps", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("ceoveilovno", model.publicNetworkAccess()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - } - - @Test - public void testSerialize() { - SignalRProperties model = - new SignalRProperties() - .withTls(new SignalRTlsSettings().withClientCertEnabled(true)) - .withFeatures( - Arrays - .asList( - new SignalRFeature() - .withFlag(FeatureFlags.ENABLE_CONNECTIVITY_LOGS) - .withValue("hmgkbrpyy") - .withProperties( - mapOf("drgvtqagn", "bnuqqkpik", "mebf", "uynhijg", "zmhjrunmp", "iarbutrcvpna")), - new SignalRFeature() - .withFlag(FeatureFlags.ENABLE_MESSAGING_LOGS) - .withValue("tdbhrbnla") - .withProperties(mapOf("ny", "myskpbhenbtkcxy", "nlqidybyxczf", "nrs")), - new SignalRFeature() - .withFlag(FeatureFlags.ENABLE_MESSAGING_LOGS) - .withValue("haaxdbabphl") - .withProperties( - mapOf("cocmnyyaztt", "lfktsths", "edckzywbiexzfey", "twwrqp", "ujwb", "eaxib")), - new SignalRFeature() - .withFlag(FeatureFlags.ENABLE_LIVE_TRACE) - .withValue("walm") - .withProperties(mapOf("zjancuxr", "oxaepd")))) - .withLiveTraceConfiguration( - new LiveTraceConfiguration() - .withEnabled("bavxbniwdjswzt") - .withCategories( - Arrays.asList(new LiveTraceCategory().withName("gnxytxhpzxbz").withEnabled("zabglcuhxwt")))) - .withResourceLogConfiguration( - new ResourceLogConfiguration() - .withCategories( - Arrays.asList(new ResourceLogCategory().withName("klbb").withEnabled("plwzbhvgyugu")))) - .withCors( - new SignalRCorsSettings().withAllowedOrigins(Arrays.asList("kfssxqukkf", "l", "mg", "xnkjzkdesl"))) - .withServerless(new ServerlessSettings().withConnectionTimeoutInSeconds(909915522)) - .withUpstream( - new ServerlessUpstreamSettings() - .withTemplates( - Arrays - .asList( - new UpstreamTemplate() - .withHubPattern("ighxpk") - .withEventPattern("zb") - .withCategoryPattern("uebbaumnyqup") - .withUrlTemplate("deoj")))) - .withNetworkACLs( - new SignalRNetworkACLs() - .withDefaultAction(AclAction.DENY) - .withPublicNetwork( - new NetworkAcl() - .withAllow( - Arrays - .asList( - SignalRRequestType.CLIENT_CONNECTION, - SignalRRequestType.TRACE, - SignalRRequestType.RESTAPI)) - .withDeny(Arrays.asList(SignalRRequestType.RESTAPI))) - .withPrivateEndpoints( - Arrays - .asList( - new PrivateEndpointAcl() - .withAllow(Arrays.asList()) - .withDeny(Arrays.asList()) - .withName("fhvpesaps"), - new PrivateEndpointAcl() - .withAllow(Arrays.asList()) - .withDeny(Arrays.asList()) - .withName("qmhjjdhtld"), - new PrivateEndpointAcl() - .withAllow(Arrays.asList()) - .withDeny(Arrays.asList()) - .withName("zxuutkncwscwsvl"), - new PrivateEndpointAcl() - .withAllow(Arrays.asList()) - .withDeny(Arrays.asList()) - .withName("ogtwrupqsxvnmi")))) - .withPublicNetworkAccess("ceoveilovno") - .withDisableLocalAuth(false) - .withDisableAadAuth(false); - model = BinaryData.fromObject(model).toObject(SignalRProperties.class); - Assertions.assertEquals(true, model.tls().clientCertEnabled()); - Assertions.assertEquals(FeatureFlags.ENABLE_CONNECTIVITY_LOGS, model.features().get(0).flag()); - Assertions.assertEquals("hmgkbrpyy", model.features().get(0).value()); - Assertions.assertEquals("bnuqqkpik", model.features().get(0).properties().get("drgvtqagn")); - Assertions.assertEquals("bavxbniwdjswzt", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("gnxytxhpzxbz", model.liveTraceConfiguration().categories().get(0).name()); - Assertions.assertEquals("zabglcuhxwt", model.liveTraceConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("klbb", model.resourceLogConfiguration().categories().get(0).name()); - Assertions.assertEquals("plwzbhvgyugu", model.resourceLogConfiguration().categories().get(0).enabled()); - Assertions.assertEquals("kfssxqukkf", model.cors().allowedOrigins().get(0)); - Assertions.assertEquals(909915522, model.serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals("ighxpk", model.upstream().templates().get(0).hubPattern()); - Assertions.assertEquals("zb", model.upstream().templates().get(0).eventPattern()); - Assertions.assertEquals("uebbaumnyqup", model.upstream().templates().get(0).categoryPattern()); - Assertions.assertEquals("deoj", model.upstream().templates().get(0).urlTemplate()); - Assertions.assertEquals(AclAction.DENY, model.networkACLs().defaultAction()); - Assertions - .assertEquals(SignalRRequestType.CLIENT_CONNECTION, model.networkACLs().publicNetwork().allow().get(0)); - Assertions.assertEquals(SignalRRequestType.RESTAPI, model.networkACLs().publicNetwork().deny().get(0)); - Assertions.assertEquals("fhvpesaps", model.networkACLs().privateEndpoints().get(0).name()); - Assertions.assertEquals("ceoveilovno", model.publicNetworkAccess()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceInnerTests.java deleted file mode 100644 index e9232950af85..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceInnerTests.java +++ /dev/null @@ -1,140 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SignalRResourceInner; -import com.azure.resourcemanager.signalr.models.AclAction; -import com.azure.resourcemanager.signalr.models.FeatureFlags; -import com.azure.resourcemanager.signalr.models.LiveTraceConfiguration; -import com.azure.resourcemanager.signalr.models.ManagedIdentity; -import com.azure.resourcemanager.signalr.models.ManagedIdentityType; -import com.azure.resourcemanager.signalr.models.ResourceLogConfiguration; -import com.azure.resourcemanager.signalr.models.ResourceSku; -import com.azure.resourcemanager.signalr.models.ServerlessSettings; -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.SignalRSkuTier; -import com.azure.resourcemanager.signalr.models.SignalRTlsSettings; -import com.azure.resourcemanager.signalr.models.UserAssignedIdentityProperty; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRResourceInnerTests { - @Test - public void testDeserialize() { - SignalRResourceInner model = - BinaryData - .fromString( - "{\"sku\":{\"name\":\"e\",\"tier\":\"Standard\",\"size\":\"v\",\"family\":\"dgwdslfhot\",\"capacity\":470013493},\"properties\":{\"provisioningState\":\"Succeeded\",\"externalIP\":\"lbjnpgacftadehx\",\"hostName\":\"tyfsoppusuesn\",\"publicPort\":1828932864,\"serverPort\":317621756,\"version\":\"avo\",\"privateEndpointConnections\":[{\"id\":\"ohctbqvudwx\",\"name\":\"ndnvo\",\"type\":\"gujjugwdkcglh\"},{\"id\":\"zj\",\"name\":\"yggdtjixh\",\"type\":\"kuofqweykhme\"},{\"id\":\"fyexfwhy\",\"name\":\"cibvyvdcsitynn\",\"type\":\"amdecte\"}],\"sharedPrivateLinkResources\":[{\"id\":\"cj\",\"name\":\"ypvhezrkg\",\"type\":\"hcjrefovgmk\"},{\"id\":\"eyyvxyqjpkcat\",\"name\":\"pngjcrcczsqpjhvm\",\"type\":\"ajvnysounqe\"},{\"id\":\"oaeupfhyhltrpmo\",\"name\":\"jmcmatuokthfu\",\"type\":\"uaodsfcpk\"}],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"uozmyzydagfua\",\"features\":[{\"flag\":\"EnableConnectivityLogs\",\"value\":\"yiuokktwh\",\"properties\":{}},{\"flag\":\"ServiceMode\",\"value\":\"wz\",\"properties\":{}},{\"flag\":\"ServiceMode\",\"value\":\"sm\",\"properties\":{}},{\"flag\":\"EnableLiveTrace\",\"value\":\"reximoryocfs\",\"properties\":{}}],\"liveTraceConfiguration\":{\"enabled\":\"mddystkiiux\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"cors\":{\"allowedOrigins\":[\"qn\"]},\"serverless\":{\"connectionTimeoutInSeconds\":1747091504},\"upstream\":{\"templates\":[]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"vjsllrmvvdfw\",\"disableLocalAuth\":true,\"disableAadAuth\":false},\"kind\":\"RawWebSockets\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"lhzdobp\":{\"principalId\":\"zwtruwiqzbqjvsov\",\"clientId\":\"okacspk\"}},\"principalId\":\"mflbv\",\"tenantId\":\"chrkcciwwzjuqk\"},\"location\":\"sa\",\"tags\":{\"foskghsauuimj\":\"ku\",\"rfbyaosvexcso\":\"vxieduugidyj\",\"vleggzfbuhfmvfax\":\"pclhocohslk\",\"hl\":\"ffeii\"},\"id\":\"m\",\"name\":\"zy\",\"type\":\"shxmzsbbzoggigrx\"}") - .toObject(SignalRResourceInner.class); - Assertions.assertEquals("sa", model.location()); - Assertions.assertEquals("ku", model.tags().get("foskghsauuimj")); - Assertions.assertEquals("e", model.sku().name()); - Assertions.assertEquals(SignalRSkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(470013493, model.sku().capacity()); - Assertions.assertEquals(ServiceKind.RAW_WEB_SOCKETS, model.kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals(FeatureFlags.ENABLE_CONNECTIVITY_LOGS, model.features().get(0).flag()); - Assertions.assertEquals("yiuokktwh", model.features().get(0).value()); - Assertions.assertEquals("mddystkiiux", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("qn", model.cors().allowedOrigins().get(0)); - Assertions.assertEquals(1747091504, model.serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().defaultAction()); - Assertions.assertEquals("vjsllrmvvdfw", model.publicNetworkAccess()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - } - - @Test - public void testSerialize() { - SignalRResourceInner model = - new SignalRResourceInner() - .withLocation("sa") - .withTags( - mapOf( - "foskghsauuimj", - "ku", - "rfbyaosvexcso", - "vxieduugidyj", - "vleggzfbuhfmvfax", - "pclhocohslk", - "hl", - "ffeii")) - .withSku(new ResourceSku().withName("e").withTier(SignalRSkuTier.STANDARD).withCapacity(470013493)) - .withKind(ServiceKind.RAW_WEB_SOCKETS) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("lhzdobp", new UserAssignedIdentityProperty()))) - .withTls(new SignalRTlsSettings().withClientCertEnabled(false)) - .withFeatures( - Arrays - .asList( - new SignalRFeature() - .withFlag(FeatureFlags.ENABLE_CONNECTIVITY_LOGS) - .withValue("yiuokktwh") - .withProperties(mapOf()), - new SignalRFeature() - .withFlag(FeatureFlags.SERVICE_MODE) - .withValue("wz") - .withProperties(mapOf()), - new SignalRFeature() - .withFlag(FeatureFlags.SERVICE_MODE) - .withValue("sm") - .withProperties(mapOf()), - new SignalRFeature() - .withFlag(FeatureFlags.ENABLE_LIVE_TRACE) - .withValue("reximoryocfs") - .withProperties(mapOf()))) - .withLiveTraceConfiguration( - new LiveTraceConfiguration().withEnabled("mddystkiiux").withCategories(Arrays.asList())) - .withResourceLogConfiguration(new ResourceLogConfiguration().withCategories(Arrays.asList())) - .withCors(new SignalRCorsSettings().withAllowedOrigins(Arrays.asList("qn"))) - .withServerless(new ServerlessSettings().withConnectionTimeoutInSeconds(1747091504)) - .withUpstream(new ServerlessUpstreamSettings().withTemplates(Arrays.asList())) - .withNetworkACLs( - new SignalRNetworkACLs().withDefaultAction(AclAction.ALLOW).withPrivateEndpoints(Arrays.asList())) - .withPublicNetworkAccess("vjsllrmvvdfw") - .withDisableLocalAuth(true) - .withDisableAadAuth(false); - model = BinaryData.fromObject(model).toObject(SignalRResourceInner.class); - Assertions.assertEquals("sa", model.location()); - Assertions.assertEquals("ku", model.tags().get("foskghsauuimj")); - Assertions.assertEquals("e", model.sku().name()); - Assertions.assertEquals(SignalRSkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(470013493, model.sku().capacity()); - Assertions.assertEquals(ServiceKind.RAW_WEB_SOCKETS, model.kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals(false, model.tls().clientCertEnabled()); - Assertions.assertEquals(FeatureFlags.ENABLE_CONNECTIVITY_LOGS, model.features().get(0).flag()); - Assertions.assertEquals("yiuokktwh", model.features().get(0).value()); - Assertions.assertEquals("mddystkiiux", model.liveTraceConfiguration().enabled()); - Assertions.assertEquals("qn", model.cors().allowedOrigins().get(0)); - Assertions.assertEquals(1747091504, model.serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals(AclAction.ALLOW, model.networkACLs().defaultAction()); - Assertions.assertEquals("vjsllrmvvdfw", model.publicNetworkAccess()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals(false, model.disableAadAuth()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceListTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceListTests.java deleted file mode 100644 index 601f5b42c84c..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRResourceListTests.java +++ /dev/null @@ -1,156 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SignalRResourceInner; -import com.azure.resourcemanager.signalr.models.ManagedIdentity; -import com.azure.resourcemanager.signalr.models.ManagedIdentityType; -import com.azure.resourcemanager.signalr.models.ResourceSku; -import com.azure.resourcemanager.signalr.models.ServiceKind; -import com.azure.resourcemanager.signalr.models.SignalRResourceList; -import com.azure.resourcemanager.signalr.models.SignalRSkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRResourceListTests { - @Test - public void testDeserialize() { - SignalRResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"jaoyfhrtx\",\"tier\":\"Free\",\"size\":\"rkujy\",\"family\":\"l\",\"capacity\":867367638},\"properties\":{\"provisioningState\":\"Canceled\",\"externalIP\":\"wrlyxwjkcprb\",\"hostName\":\"b\",\"publicPort\":19976049,\"serverPort\":1017472579,\"version\":\"vpys\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"uj\",\"features\":[],\"publicNetworkAccess\":\"f\",\"disableLocalAuth\":true,\"disableAadAuth\":true},\"kind\":\"RawWebSockets\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"wu\",\"tenantId\":\"gazxuf\"},\"location\":\"uckyf\",\"tags\":{\"zuhtymwisdkfthwx\":\"fidfvzw\",\"mijcmmxdcufufs\":\"nteiwaopv\",\"fycc\":\"pymzidnsezcxtbzs\"},\"id\":\"newmdwzjeiachbo\",\"name\":\"sflnrosfqp\",\"type\":\"eeh\"},{\"sku\":{\"name\":\"vypyqrimzinpv\",\"tier\":\"Standard\",\"size\":\"kirsoodqxhc\",\"family\":\"nohjt\",\"capacity\":683362936},\"properties\":{\"provisioningState\":\"Running\",\"externalIP\":\"ifiyipjxsqwpgrj\",\"hostName\":\"norcjxvsnbyxqab\",\"publicPort\":1299140464,\"serverPort\":1412724720,\"version\":\"ysh\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"bl\",\"features\":[],\"publicNetworkAccess\":\"jmkljavbqidtqajz\",\"disableLocalAuth\":false,\"disableAadAuth\":true},\"kind\":\"SignalR\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"hbzhfepg\",\"tenantId\":\"qex\"},\"location\":\"ocxscpaierhhbcs\",\"tags\":{\"bnbdxkqpxokajion\":\"mmajtjaodx\",\"jrmvdjwzrlo\":\"imexgstxgcpodgma\",\"hijco\":\"mcl\"},\"id\":\"jctbza\",\"name\":\"s\",\"type\":\"sycbkbfk\"},{\"sku\":{\"name\":\"kdkexxp\",\"tier\":\"Free\",\"size\":\"xaxcfjpgddtocjjx\",\"family\":\"pmouexhdz\",\"capacity\":738311617},\"properties\":{\"provisioningState\":\"Creating\",\"externalIP\":\"nxqbzvddn\",\"hostName\":\"ndei\",\"publicPort\":1638817627,\"serverPort\":1604770276,\"version\":\"zao\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"hcffcyddglmjthjq\",\"features\":[],\"publicNetworkAccess\":\"qciwqvhkhixuigdt\",\"disableLocalAuth\":false,\"disableAadAuth\":true},\"kind\":\"SignalR\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"u\",\"tenantId\":\"a\"},\"location\":\"rzayv\",\"tags\":{\"ln\":\"gvdfgiotkftutq\",\"qmi\":\"xlefgugnxkrx\"},\"id\":\"tthzrvqd\",\"name\":\"abhjybi\",\"type\":\"ehoqfbowskan\"},{\"sku\":{\"name\":\"tzlcuiywgqywgn\",\"tier\":\"Standard\",\"size\":\"nhzgpphrcgyn\",\"family\":\"cpecfvmmcoofs\",\"capacity\":1165207027},\"properties\":{\"provisioningState\":\"Moving\",\"externalIP\":\"m\",\"hostName\":\"qabcypm\",\"publicPort\":1275704162,\"serverPort\":699585009,\"version\":\"uvcc\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"hostNamePrefix\":\"bacfionlebxetq\",\"features\":[],\"publicNetworkAccess\":\"qqwx\",\"disableLocalAuth\":true,\"disableAadAuth\":false},\"kind\":\"RawWebSockets\",\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{},\"principalId\":\"isnjampmngnz\",\"tenantId\":\"xaqwoochcbonqv\"},\"location\":\"vlrxnjeaseiph\",\"tags\":{\"enjbdlwtgrhp\":\"lokeyy\"},\"id\":\"jp\",\"name\":\"umasxazjpq\",\"type\":\"e\"}],\"nextLink\":\"alhbx\"}") - .toObject(SignalRResourceList.class); - Assertions.assertEquals("uckyf", model.value().get(0).location()); - Assertions.assertEquals("fidfvzw", model.value().get(0).tags().get("zuhtymwisdkfthwx")); - Assertions.assertEquals("jaoyfhrtx", model.value().get(0).sku().name()); - Assertions.assertEquals(SignalRSkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals(867367638, model.value().get(0).sku().capacity()); - Assertions.assertEquals(ServiceKind.RAW_WEB_SOCKETS, model.value().get(0).kind()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(true, model.value().get(0).disableAadAuth()); - Assertions.assertEquals("alhbx", model.nextLink()); - } - - @Test - public void testSerialize() { - SignalRResourceList model = - new SignalRResourceList() - .withValue( - Arrays - .asList( - new SignalRResourceInner() - .withLocation("uckyf") - .withTags( - mapOf( - "zuhtymwisdkfthwx", - "fidfvzw", - "mijcmmxdcufufs", - "nteiwaopv", - "fycc", - "pymzidnsezcxtbzs")) - .withSku( - new ResourceSku() - .withName("jaoyfhrtx") - .withTier(SignalRSkuTier.FREE) - .withCapacity(867367638)) - .withKind(ServiceKind.RAW_WEB_SOCKETS) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withFeatures(Arrays.asList()) - .withPublicNetworkAccess("f") - .withDisableLocalAuth(true) - .withDisableAadAuth(true), - new SignalRResourceInner() - .withLocation("ocxscpaierhhbcs") - .withTags( - mapOf( - "bnbdxkqpxokajion", - "mmajtjaodx", - "jrmvdjwzrlo", - "imexgstxgcpodgma", - "hijco", - "mcl")) - .withSku( - new ResourceSku() - .withName("vypyqrimzinpv") - .withTier(SignalRSkuTier.STANDARD) - .withCapacity(683362936)) - .withKind(ServiceKind.SIGNALR) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withFeatures(Arrays.asList()) - .withPublicNetworkAccess("jmkljavbqidtqajz") - .withDisableLocalAuth(false) - .withDisableAadAuth(true), - new SignalRResourceInner() - .withLocation("rzayv") - .withTags(mapOf("ln", "gvdfgiotkftutq", "qmi", "xlefgugnxkrx")) - .withSku( - new ResourceSku() - .withName("kdkexxp") - .withTier(SignalRSkuTier.FREE) - .withCapacity(738311617)) - .withKind(ServiceKind.SIGNALR) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withFeatures(Arrays.asList()) - .withPublicNetworkAccess("qciwqvhkhixuigdt") - .withDisableLocalAuth(false) - .withDisableAadAuth(true), - new SignalRResourceInner() - .withLocation("vlrxnjeaseiph") - .withTags(mapOf("enjbdlwtgrhp", "lokeyy")) - .withSku( - new ResourceSku() - .withName("tzlcuiywgqywgn") - .withTier(SignalRSkuTier.STANDARD) - .withCapacity(1165207027)) - .withKind(ServiceKind.RAW_WEB_SOCKETS) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withFeatures(Arrays.asList()) - .withPublicNetworkAccess("qqwx") - .withDisableLocalAuth(true) - .withDisableAadAuth(false))) - .withNextLink("alhbx"); - model = BinaryData.fromObject(model).toObject(SignalRResourceList.class); - Assertions.assertEquals("uckyf", model.value().get(0).location()); - Assertions.assertEquals("fidfvzw", model.value().get(0).tags().get("zuhtymwisdkfthwx")); - Assertions.assertEquals("jaoyfhrtx", model.value().get(0).sku().name()); - Assertions.assertEquals(SignalRSkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals(867367638, model.value().get(0).sku().capacity()); - Assertions.assertEquals(ServiceKind.RAW_WEB_SOCKETS, model.value().get(0).kind()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals(true, model.value().get(0).disableLocalAuth()); - Assertions.assertEquals(true, model.value().get(0).disableAadAuth()); - Assertions.assertEquals("alhbx", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateMockTests.java deleted file mode 100644 index 0a9491a43025..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,76 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.SharedPrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRSharedPrivateLinkResourcesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"zejntps\",\"privateLinkResourceId\":\"wgioilqukry\",\"provisioningState\":\"Succeeded\",\"requestMessage\":\"mieoxorgguf\",\"status\":\"Pending\"},\"id\":\"omtbghhavgrvkff\",\"name\":\"vjzhpjbib\",\"type\":\"jmfxumvf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SharedPrivateLinkResource response = - manager - .signalRSharedPrivateLinkResources() - .define("tw") - .withExistingSignalR("sgogczhonnxk", "lgnyhmo") - .withGroupId("kkgthr") - .withPrivateLinkResourceId("gh") - .withRequestMessage("hqxvcxgfrpdsofbs") - .create(); - - Assertions.assertEquals("zejntps", response.groupId()); - Assertions.assertEquals("wgioilqukry", response.privateLinkResourceId()); - Assertions.assertEquals("mieoxorgguf", response.requestMessage()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteMockTests.java deleted file mode 100644 index 969bf222310e..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesDeleteMockTests.java +++ /dev/null @@ -1,62 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRSharedPrivateLinkResourcesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.signalRSharedPrivateLinkResources().delete("zronasxift", "zq", "zh", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index 2f87ddec258a..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.SharedPrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRSharedPrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"dfdlwggyts\",\"privateLinkResourceId\":\"wtovvtgsein\",\"provisioningState\":\"Moving\",\"requestMessage\":\"fxqknpirgneptt\",\"status\":\"Timeout\"},\"id\":\"sniffc\",\"name\":\"mqnrojlpijnkr\",\"type\":\"frddhcrati\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SharedPrivateLinkResource response = - manager - .signalRSharedPrivateLinkResources() - .getWithResponse("knfd", "twjchrdg", "ihxumwctondzj", Context.NONE) - .getValue(); - - Assertions.assertEquals("dfdlwggyts", response.groupId()); - Assertions.assertEquals("wtovvtgsein", response.privateLinkResourceId()); - Assertions.assertEquals("fxqknpirgneptt", response.requestMessage()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesListMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesListMockTests.java deleted file mode 100644 index 57ae7172b521..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRSharedPrivateLinkResourcesListMockTests.java +++ /dev/null @@ -1,71 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.SharedPrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRSharedPrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"lmcuvhixb\",\"privateLinkResourceId\":\"xyfwnylrcool\",\"provisioningState\":\"Deleting\",\"requestMessage\":\"kiwkkbnujr\",\"status\":\"Rejected\"},\"id\":\"tylbfpncurdoiw\",\"name\":\"ithtywu\",\"type\":\"xcbihw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.signalRSharedPrivateLinkResources().list("dscwxqupevzhf", "totxhojujb", Context.NONE); - - Assertions.assertEquals("lmcuvhixb", response.iterator().next().groupId()); - Assertions.assertEquals("xyfwnylrcool", response.iterator().next().privateLinkResourceId()); - Assertions.assertEquals("kiwkkbnujr", response.iterator().next().requestMessage()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRTlsSettingsTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRTlsSettingsTests.java deleted file mode 100644 index 94e3ab0d26b4..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRTlsSettingsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.SignalRTlsSettings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRTlsSettingsTests { - @Test - public void testDeserialize() { - SignalRTlsSettings model = - BinaryData.fromString("{\"clientCertEnabled\":true}").toObject(SignalRTlsSettings.class); - Assertions.assertEquals(true, model.clientCertEnabled()); - } - - @Test - public void testSerialize() { - SignalRTlsSettings model = new SignalRTlsSettings().withClientCertEnabled(true); - model = BinaryData.fromObject(model).toObject(SignalRTlsSettings.class); - Assertions.assertEquals(true, model.clientCertEnabled()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageInnerTests.java deleted file mode 100644 index 4c524af1253f..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageInnerTests.java +++ /dev/null @@ -1,46 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SignalRUsageInner; -import com.azure.resourcemanager.signalr.models.SignalRUsageName; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRUsageInnerTests { - @Test - public void testDeserialize() { - SignalRUsageInner model = - BinaryData - .fromString( - "{\"id\":\"qktapspwgcuert\",\"currentValue\":7020809285560485144,\"limit\":6338655194328976084,\"name\":{\"value\":\"hbmdgbbjfdd\",\"localizedValue\":\"bmbexppbhtqqro\"},\"unit\":\"p\"}") - .toObject(SignalRUsageInner.class); - Assertions.assertEquals("qktapspwgcuert", model.id()); - Assertions.assertEquals(7020809285560485144L, model.currentValue()); - Assertions.assertEquals(6338655194328976084L, model.limit()); - Assertions.assertEquals("hbmdgbbjfdd", model.name().value()); - Assertions.assertEquals("bmbexppbhtqqro", model.name().localizedValue()); - Assertions.assertEquals("p", model.unit()); - } - - @Test - public void testSerialize() { - SignalRUsageInner model = - new SignalRUsageInner() - .withId("qktapspwgcuert") - .withCurrentValue(7020809285560485144L) - .withLimit(6338655194328976084L) - .withName(new SignalRUsageName().withValue("hbmdgbbjfdd").withLocalizedValue("bmbexppbhtqqro")) - .withUnit("p"); - model = BinaryData.fromObject(model).toObject(SignalRUsageInner.class); - Assertions.assertEquals("qktapspwgcuert", model.id()); - Assertions.assertEquals(7020809285560485144L, model.currentValue()); - Assertions.assertEquals(6338655194328976084L, model.limit()); - Assertions.assertEquals("hbmdgbbjfdd", model.name().value()); - Assertions.assertEquals("bmbexppbhtqqro", model.name().localizedValue()); - Assertions.assertEquals("p", model.unit()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageListTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageListTests.java deleted file mode 100644 index 1eb1dff4a70d..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageListTests.java +++ /dev/null @@ -1,74 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SignalRUsageInner; -import com.azure.resourcemanager.signalr.models.SignalRUsageList; -import com.azure.resourcemanager.signalr.models.SignalRUsageName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRUsageListTests { - @Test - public void testDeserialize() { - SignalRUsageList model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"feusnhut\",\"currentValue\":7488631932267615574,\"limit\":1681358719295999682,\"name\":{\"value\":\"ugjzzdatqxhocdge\",\"localizedValue\":\"lgphu\"},\"unit\":\"cndvkaozwyiftyhx\"},{\"id\":\"rokft\",\"currentValue\":3868150209180294588,\"limit\":8023201833032933577,\"name\":{\"value\":\"cukjf\",\"localizedValue\":\"iawxklry\"},\"unit\":\"wckbasyypnd\"},{\"id\":\"sgcbac\",\"currentValue\":3223006673254134056,\"limit\":1592886583482291968,\"name\":{\"value\":\"qgoulznd\",\"localizedValue\":\"kwy\"},\"unit\":\"gfgibm\"},{\"id\":\"gakeqsr\",\"currentValue\":4764420434211011454,\"limit\":7229748892246039848,\"name\":{\"value\":\"ytb\",\"localizedValue\":\"qfou\"},\"unit\":\"mmnkzsmodmgl\"}],\"nextLink\":\"gpbkwtmut\"}") - .toObject(SignalRUsageList.class); - Assertions.assertEquals("feusnhut", model.value().get(0).id()); - Assertions.assertEquals(7488631932267615574L, model.value().get(0).currentValue()); - Assertions.assertEquals(1681358719295999682L, model.value().get(0).limit()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.value().get(0).name().value()); - Assertions.assertEquals("lgphu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("cndvkaozwyiftyhx", model.value().get(0).unit()); - Assertions.assertEquals("gpbkwtmut", model.nextLink()); - } - - @Test - public void testSerialize() { - SignalRUsageList model = - new SignalRUsageList() - .withValue( - Arrays - .asList( - new SignalRUsageInner() - .withId("feusnhut") - .withCurrentValue(7488631932267615574L) - .withLimit(1681358719295999682L) - .withName( - new SignalRUsageName().withValue("ugjzzdatqxhocdge").withLocalizedValue("lgphu")) - .withUnit("cndvkaozwyiftyhx"), - new SignalRUsageInner() - .withId("rokft") - .withCurrentValue(3868150209180294588L) - .withLimit(8023201833032933577L) - .withName(new SignalRUsageName().withValue("cukjf").withLocalizedValue("iawxklry")) - .withUnit("wckbasyypnd"), - new SignalRUsageInner() - .withId("sgcbac") - .withCurrentValue(3223006673254134056L) - .withLimit(1592886583482291968L) - .withName(new SignalRUsageName().withValue("qgoulznd").withLocalizedValue("kwy")) - .withUnit("gfgibm"), - new SignalRUsageInner() - .withId("gakeqsr") - .withCurrentValue(4764420434211011454L) - .withLimit(7229748892246039848L) - .withName(new SignalRUsageName().withValue("ytb").withLocalizedValue("qfou")) - .withUnit("mmnkzsmodmgl"))) - .withNextLink("gpbkwtmut"); - model = BinaryData.fromObject(model).toObject(SignalRUsageList.class); - Assertions.assertEquals("feusnhut", model.value().get(0).id()); - Assertions.assertEquals(7488631932267615574L, model.value().get(0).currentValue()); - Assertions.assertEquals(1681358719295999682L, model.value().get(0).limit()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.value().get(0).name().value()); - Assertions.assertEquals("lgphu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("cndvkaozwyiftyhx", model.value().get(0).unit()); - Assertions.assertEquals("gpbkwtmut", model.nextLink()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageNameTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageNameTests.java deleted file mode 100644 index 819b76a8e8c7..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRUsageNameTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.SignalRUsageName; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SignalRUsageNameTests { - @Test - public void testDeserialize() { - SignalRUsageName model = - BinaryData.fromString("{\"value\":\"s\",\"localizedValue\":\"gbquxigj\"}").toObject(SignalRUsageName.class); - Assertions.assertEquals("s", model.value()); - Assertions.assertEquals("gbquxigj", model.localizedValue()); - } - - @Test - public void testSerialize() { - SignalRUsageName model = new SignalRUsageName().withValue("s").withLocalizedValue("gbquxigj"); - model = BinaryData.fromObject(model).toObject(SignalRUsageName.class); - Assertions.assertEquals("s", model.value()); - Assertions.assertEquals("gbquxigj", model.localizedValue()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCheckNameAvailabilityWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 608787f736eb..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,74 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.NameAvailability; -import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":true,\"reason\":\"vc\",\"message\":\"y\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailability response = - manager - .signalRs() - .checkNameAvailabilityWithResponse( - "lla", new NameAvailabilityParameters().withType("melwuipiccjz").withName("z"), Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("vc", response.reason()); - Assertions.assertEquals("y", response.message()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCreateOrUpdateMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCreateOrUpdateMockTests.java deleted file mode 100644 index e3a481df7252..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,132 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.AclAction; -import com.azure.resourcemanager.signalr.models.LiveTraceConfiguration; -import com.azure.resourcemanager.signalr.models.ManagedIdentity; -import com.azure.resourcemanager.signalr.models.ManagedIdentityType; -import com.azure.resourcemanager.signalr.models.ResourceLogConfiguration; -import com.azure.resourcemanager.signalr.models.ResourceSku; -import com.azure.resourcemanager.signalr.models.ServerlessSettings; -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.SignalRNetworkACLs; -import com.azure.resourcemanager.signalr.models.SignalRResource; -import com.azure.resourcemanager.signalr.models.SignalRSkuTier; -import com.azure.resourcemanager.signalr.models.SignalRTlsSettings; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"mzqhoftrmaequi\",\"tier\":\"Basic\",\"size\":\"cslfaoqzpiyylha\",\"family\":\"swhccsphk\",\"capacity\":185919180},\"properties\":{\"provisioningState\":\"Succeeded\",\"externalIP\":\"scywuggwoluhc\",\"hostName\":\"wem\",\"publicPort\":19957652,\"serverPort\":1127329459,\"version\":\"rgzdwmsweyp\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"cnxqhuexmkttlst\",\"features\":[],\"liveTraceConfiguration\":{\"enabled\":\"emhzrncsdtc\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"cors\":{\"allowedOrigins\":[]},\"serverless\":{\"connectionTimeoutInSeconds\":1674447280},\"upstream\":{\"templates\":[]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"eadcygqukyhejhz\",\"disableLocalAuth\":true,\"disableAadAuth\":false},\"kind\":\"RawWebSockets\",\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{},\"principalId\":\"ksrpqv\",\"tenantId\":\"zraehtwd\"},\"location\":\"ftswibyrcdlbhsh\",\"tags\":{\"hevxcced\":\"racstwity\"},\"id\":\"pnmdyodnwzxltjcv\",\"name\":\"hlt\",\"type\":\"ugcxnavvwxq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SignalRResource response = - manager - .signalRs() - .define("zkoj") - .withRegion("ogvbbejdcngq") - .withExistingResourceGroup("wwa") - .withTags(mapOf("wr", "akufgmjz", "u", "grtwae")) - .withSku(new ResourceSku().withName("c").withTier(SignalRSkuTier.STANDARD).withCapacity(1660457179)) - .withKind(ServiceKind.RAW_WEB_SOCKETS) - .withIdentity( - new ManagedIdentity() - .withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withTls(new SignalRTlsSettings().withClientCertEnabled(false)) - .withFeatures(Arrays.asList()) - .withLiveTraceConfiguration( - new LiveTraceConfiguration().withEnabled("uximerqfobw").withCategories(Arrays.asList())) - .withResourceLogConfiguration(new ResourceLogConfiguration().withCategories(Arrays.asList())) - .withCors(new SignalRCorsSettings().withAllowedOrigins(Arrays.asList())) - .withServerless(new ServerlessSettings().withConnectionTimeoutInSeconds(189482477)) - .withUpstream(new ServerlessUpstreamSettings().withTemplates(Arrays.asList())) - .withNetworkACLs( - new SignalRNetworkACLs().withDefaultAction(AclAction.DENY).withPrivateEndpoints(Arrays.asList())) - .withPublicNetworkAccess("hrskdsnfd") - .withDisableLocalAuth(true) - .withDisableAadAuth(true) - .create(); - - Assertions.assertEquals("ftswibyrcdlbhsh", response.location()); - Assertions.assertEquals("racstwity", response.tags().get("hevxcced")); - Assertions.assertEquals("mzqhoftrmaequi", response.sku().name()); - Assertions.assertEquals(SignalRSkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals(185919180, response.sku().capacity()); - Assertions.assertEquals(ServiceKind.RAW_WEB_SOCKETS, response.kind()); - Assertions.assertEquals(ManagedIdentityType.NONE, response.identity().type()); - Assertions.assertEquals(true, response.tls().clientCertEnabled()); - Assertions.assertEquals("emhzrncsdtc", response.liveTraceConfiguration().enabled()); - Assertions.assertEquals(1674447280, response.serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals(AclAction.ALLOW, response.networkACLs().defaultAction()); - Assertions.assertEquals("eadcygqukyhejhz", response.publicNetworkAccess()); - Assertions.assertEquals(true, response.disableLocalAuth()); - Assertions.assertEquals(false, response.disableAadAuth()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsDeleteMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsDeleteMockTests.java deleted file mode 100644 index f5000782b6a0..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsDeleteMockTests.java +++ /dev/null @@ -1,62 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.signalRs().delete("aznqntoru", "sgsahmkycgr", Context.NONE); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsGetByResourceGroupWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 66878d8484d5..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,85 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.AclAction; -import com.azure.resourcemanager.signalr.models.ManagedIdentityType; -import com.azure.resourcemanager.signalr.models.ServiceKind; -import com.azure.resourcemanager.signalr.models.SignalRResource; -import com.azure.resourcemanager.signalr.models.SignalRSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"wj\",\"tier\":\"Free\",\"size\":\"kacjvefkdlfo\",\"family\":\"ggkfpagaowpul\",\"capacity\":1177485669},\"properties\":{\"provisioningState\":\"Updating\",\"externalIP\":\"yxkqjnsjer\",\"hostName\":\"iagxsdszuempsbz\",\"publicPort\":71389459,\"serverPort\":1389741266,\"version\":\"v\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":true},\"hostNamePrefix\":\"kjj\",\"features\":[],\"liveTraceConfiguration\":{\"enabled\":\"uukzclewyhmlw\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"cors\":{\"allowedOrigins\":[]},\"serverless\":{\"connectionTimeoutInSeconds\":1158924531},\"upstream\":{\"templates\":[]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"whxxbuyqax\",\"disableLocalAuth\":false,\"disableAadAuth\":true},\"kind\":\"SignalR\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"or\",\"tenantId\":\"lt\"},\"location\":\"mncwsobqwcsdb\",\"tags\":{\"ucqdpfuvglsb\":\"cf\",\"cormr\":\"jcanvxbvtvudut\",\"f\":\"xqtvcofu\"},\"id\":\"vkg\",\"name\":\"u\",\"type\":\"gdknnqv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SignalRResource response = - manager.signalRs().getByResourceGroupWithResponse("emmsbvdkc", "odtji", Context.NONE).getValue(); - - Assertions.assertEquals("mncwsobqwcsdb", response.location()); - Assertions.assertEquals("cf", response.tags().get("ucqdpfuvglsb")); - Assertions.assertEquals("wj", response.sku().name()); - Assertions.assertEquals(SignalRSkuTier.FREE, response.sku().tier()); - Assertions.assertEquals(1177485669, response.sku().capacity()); - Assertions.assertEquals(ServiceKind.SIGNALR, response.kind()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(true, response.tls().clientCertEnabled()); - Assertions.assertEquals("uukzclewyhmlw", response.liveTraceConfiguration().enabled()); - Assertions.assertEquals(1158924531, response.serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals(AclAction.DENY, response.networkACLs().defaultAction()); - Assertions.assertEquals("whxxbuyqax", response.publicNetworkAccess()); - Assertions.assertEquals(false, response.disableLocalAuth()); - Assertions.assertEquals(true, response.disableAadAuth()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListByResourceGroupMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListByResourceGroupMockTests.java deleted file mode 100644 index 88d18f948362..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListByResourceGroupMockTests.java +++ /dev/null @@ -1,85 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.AclAction; -import com.azure.resourcemanager.signalr.models.ManagedIdentityType; -import com.azure.resourcemanager.signalr.models.ServiceKind; -import com.azure.resourcemanager.signalr.models.SignalRResource; -import com.azure.resourcemanager.signalr.models.SignalRSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"name\":\"r\",\"tier\":\"Premium\",\"size\":\"mjsjqb\",\"family\":\"hyxxrwlycoduhpk\",\"capacity\":1440361385},\"properties\":{\"provisioningState\":\"Moving\",\"externalIP\":\"eqnajxqugjhkycu\",\"hostName\":\"ddg\",\"publicPort\":947899145,\"serverPort\":583924547,\"version\":\"mzqa\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"xacqqudfnbyx\",\"features\":[],\"liveTraceConfiguration\":{\"enabled\":\"jyvayffimrzrtuz\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"cors\":{\"allowedOrigins\":[]},\"serverless\":{\"connectionTimeoutInSeconds\":2124595132},\"upstream\":{\"templates\":[]},\"networkACLs\":{\"defaultAction\":\"Allow\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"wzsyyceuzs\",\"disableLocalAuth\":true,\"disableAadAuth\":false},\"kind\":\"RawWebSockets\",\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"hzv\",\"tenantId\":\"tdwkqbrq\"},\"location\":\"paxh\",\"tags\":{\"ivpdtiir\":\"i\",\"yfxrx\":\"tdqoaxoruzfgsq\",\"ptramxj\":\"l\",\"nwxuqlcvydyp\":\"zwl\"},\"id\":\"tdooaoj\",\"name\":\"niodkooeb\",\"type\":\"nuj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.signalRs().listByResourceGroup("su", Context.NONE); - - Assertions.assertEquals("paxh", response.iterator().next().location()); - Assertions.assertEquals("i", response.iterator().next().tags().get("ivpdtiir")); - Assertions.assertEquals("r", response.iterator().next().sku().name()); - Assertions.assertEquals(SignalRSkuTier.PREMIUM, response.iterator().next().sku().tier()); - Assertions.assertEquals(1440361385, response.iterator().next().sku().capacity()); - Assertions.assertEquals(ServiceKind.RAW_WEB_SOCKETS, response.iterator().next().kind()); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(false, response.iterator().next().tls().clientCertEnabled()); - Assertions.assertEquals("jyvayffimrzrtuz", response.iterator().next().liveTraceConfiguration().enabled()); - Assertions.assertEquals(2124595132, response.iterator().next().serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals(AclAction.ALLOW, response.iterator().next().networkACLs().defaultAction()); - Assertions.assertEquals("wzsyyceuzs", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals(true, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(false, response.iterator().next().disableAadAuth()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListMockTests.java deleted file mode 100644 index 2ee246327c94..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListMockTests.java +++ /dev/null @@ -1,85 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.AclAction; -import com.azure.resourcemanager.signalr.models.ManagedIdentityType; -import com.azure.resourcemanager.signalr.models.ServiceKind; -import com.azure.resourcemanager.signalr.models.SignalRResource; -import com.azure.resourcemanager.signalr.models.SignalRSkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"name\":\"yrnxxmueedn\",\"tier\":\"Basic\",\"size\":\"stkwqqtch\",\"family\":\"lmfmtdaay\",\"capacity\":76843266},\"properties\":{\"provisioningState\":\"Moving\",\"externalIP\":\"iohgwxrtfud\",\"hostName\":\"pxgy\",\"publicPort\":581712977,\"serverPort\":1910249555,\"version\":\"mnpkukghimdblxg\",\"privateEndpointConnections\":[],\"sharedPrivateLinkResources\":[],\"tls\":{\"clientCertEnabled\":false},\"hostNamePrefix\":\"xw\",\"features\":[],\"liveTraceConfiguration\":{\"enabled\":\"foqreyfkzik\",\"categories\":[]},\"resourceLogConfiguration\":{\"categories\":[]},\"cors\":{\"allowedOrigins\":[]},\"serverless\":{\"connectionTimeoutInSeconds\":841259449},\"upstream\":{\"templates\":[]},\"networkACLs\":{\"defaultAction\":\"Deny\",\"privateEndpoints\":[]},\"publicNetworkAccess\":\"irels\",\"disableLocalAuth\":false,\"disableAadAuth\":true},\"kind\":\"SignalR\",\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{},\"principalId\":\"ddxbjhwuaanoz\",\"tenantId\":\"sphyoulpjrvxa\"},\"location\":\"rvimjwosytxitcsk\",\"tags\":{\"miekkezzikhlyfjh\":\"tq\"},\"id\":\"gqggebdunygae\",\"name\":\"idb\",\"type\":\"fatpxllrxcyjmoa\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.signalRs().list(Context.NONE); - - Assertions.assertEquals("rvimjwosytxitcsk", response.iterator().next().location()); - Assertions.assertEquals("tq", response.iterator().next().tags().get("miekkezzikhlyfjh")); - Assertions.assertEquals("yrnxxmueedn", response.iterator().next().sku().name()); - Assertions.assertEquals(SignalRSkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals(76843266, response.iterator().next().sku().capacity()); - Assertions.assertEquals(ServiceKind.SIGNALR, response.iterator().next().kind()); - Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(false, response.iterator().next().tls().clientCertEnabled()); - Assertions.assertEquals("foqreyfkzik", response.iterator().next().liveTraceConfiguration().enabled()); - Assertions.assertEquals(841259449, response.iterator().next().serverless().connectionTimeoutInSeconds()); - Assertions.assertEquals(AclAction.DENY, response.iterator().next().networkACLs().defaultAction()); - Assertions.assertEquals("irels", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals(false, response.iterator().next().disableLocalAuth()); - Assertions.assertEquals(true, response.iterator().next().disableAadAuth()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListSkusWithResponseMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListSkusWithResponseMockTests.java deleted file mode 100644 index 87997868a215..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SignalRsListSkusWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.SkuList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SignalRsListSkusWithResponseMockTests { - @Test - public void testListSkusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"puqujmqlgkfbtn\"},{\"resourceType\":\"n\"},{\"resourceType\":\"ntuji\"}],\"nextLink\":\"df\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuList response = manager.signalRs().listSkusWithResponse("wabm", "oefki", Context.NONE).getValue(); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuCapacityTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuCapacityTests.java deleted file mode 100644 index 24b774f2f811..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuCapacityTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.SkuCapacity; -import org.junit.jupiter.api.Test; - -public final class SkuCapacityTests { - @Test - public void testDeserialize() { - SkuCapacity model = - BinaryData - .fromString( - "{\"minimum\":1807196723,\"maximum\":706339919,\"default\":1505312764,\"allowedValues\":[1202446824,49969250,1940246801,1488672187],\"scaleType\":\"Automatic\"}") - .toObject(SkuCapacity.class); - } - - @Test - public void testSerialize() { - SkuCapacity model = new SkuCapacity(); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuListInnerTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuListInnerTests.java deleted file mode 100644 index 7af888d97b99..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuListInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.fluent.models.SkuListInner; -import org.junit.jupiter.api.Test; - -public final class SkuListInnerTests { - @Test - public void testDeserialize() { - SkuListInner model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"ipfpubji\",\"sku\":{\"name\":\"wifto\",\"tier\":\"Premium\",\"size\":\"puvks\",\"family\":\"lsa\",\"capacity\":931393503},\"capacity\":{\"minimum\":1486406311,\"maximum\":10368328,\"default\":962840058,\"allowedValues\":[],\"scaleType\":\"Automatic\"}},{\"resourceType\":\"pxodlqiyntorzih\",\"sku\":{\"name\":\"osjswsr\",\"tier\":\"Premium\",\"size\":\"zrpzb\",\"family\":\"ckqqzqioxiysui\",\"capacity\":2121235922},\"capacity\":{\"minimum\":2066516032,\"maximum\":1368967398,\"default\":2903501,\"allowedValues\":[],\"scaleType\":\"Manual\"}}],\"nextLink\":\"q\"}") - .toObject(SkuListInner.class); - } - - @Test - public void testSerialize() { - SkuListInner model = new SkuListInner(); - model = BinaryData.fromObject(model).toObject(SkuListInner.class); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuTests.java deleted file mode 100644 index d74290b01f54..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/SkuTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.Sku; -import org.junit.jupiter.api.Test; - -public final class SkuTests { - @Test - public void testDeserialize() { - Sku model = - BinaryData - .fromString( - "{\"resourceType\":\"bzyh\",\"sku\":{\"name\":\"tsmypyynpcdp\",\"tier\":\"Standard\",\"size\":\"g\",\"family\":\"z\",\"capacity\":1417683929},\"capacity\":{\"minimum\":859745448,\"maximum\":1095888431,\"default\":1347586165,\"allowedValues\":[1287311603,1807799282],\"scaleType\":\"Automatic\"}}") - .toObject(Sku.class); - } - - @Test - public void testSerialize() { - Sku model = new Sku(); - model = BinaryData.fromObject(model).toObject(Sku.class); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamAuthSettingsTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamAuthSettingsTests.java deleted file mode 100644 index bdf80266d06c..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamAuthSettingsTests.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ManagedIdentitySettings; -import com.azure.resourcemanager.signalr.models.UpstreamAuthSettings; -import com.azure.resourcemanager.signalr.models.UpstreamAuthType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UpstreamAuthSettingsTests { - @Test - public void testDeserialize() { - UpstreamAuthSettings model = - BinaryData - .fromString("{\"type\":\"ManagedIdentity\",\"managedIdentity\":{\"resource\":\"gpfqbuace\"}}") - .toObject(UpstreamAuthSettings.class); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.type()); - Assertions.assertEquals("gpfqbuace", model.managedIdentity().resource()); - } - - @Test - public void testSerialize() { - UpstreamAuthSettings model = - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("gpfqbuace")); - model = BinaryData.fromObject(model).toObject(UpstreamAuthSettings.class); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.type()); - Assertions.assertEquals("gpfqbuace", model.managedIdentity().resource()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamTemplateTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamTemplateTests.java deleted file mode 100644 index a17fe4bbec94..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UpstreamTemplateTests.java +++ /dev/null @@ -1,51 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.ManagedIdentitySettings; -import com.azure.resourcemanager.signalr.models.UpstreamAuthSettings; -import com.azure.resourcemanager.signalr.models.UpstreamAuthType; -import com.azure.resourcemanager.signalr.models.UpstreamTemplate; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UpstreamTemplateTests { - @Test - public void testDeserialize() { - UpstreamTemplate model = - BinaryData - .fromString( - "{\"hubPattern\":\"bnxknalaulppg\",\"eventPattern\":\"tpnapnyiropuhpig\",\"categoryPattern\":\"gylgqgitxmedjvcs\",\"urlTemplate\":\"ynqwwncwzzhxgk\",\"auth\":{\"type\":\"ManagedIdentity\",\"managedIdentity\":{\"resource\":\"napkteoellw\"}}}") - .toObject(UpstreamTemplate.class); - Assertions.assertEquals("bnxknalaulppg", model.hubPattern()); - Assertions.assertEquals("tpnapnyiropuhpig", model.eventPattern()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.categoryPattern()); - Assertions.assertEquals("ynqwwncwzzhxgk", model.urlTemplate()); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.auth().type()); - Assertions.assertEquals("napkteoellw", model.auth().managedIdentity().resource()); - } - - @Test - public void testSerialize() { - UpstreamTemplate model = - new UpstreamTemplate() - .withHubPattern("bnxknalaulppg") - .withEventPattern("tpnapnyiropuhpig") - .withCategoryPattern("gylgqgitxmedjvcs") - .withUrlTemplate("ynqwwncwzzhxgk") - .withAuth( - new UpstreamAuthSettings() - .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("napkteoellw"))); - model = BinaryData.fromObject(model).toObject(UpstreamTemplate.class); - Assertions.assertEquals("bnxknalaulppg", model.hubPattern()); - Assertions.assertEquals("tpnapnyiropuhpig", model.eventPattern()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.categoryPattern()); - Assertions.assertEquals("ynqwwncwzzhxgk", model.urlTemplate()); - Assertions.assertEquals(UpstreamAuthType.MANAGED_IDENTITY, model.auth().type()); - Assertions.assertEquals("napkteoellw", model.auth().managedIdentity().resource()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UsagesListMockTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UsagesListMockTests.java deleted file mode 100644 index 24d5956759ce..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UsagesListMockTests.java +++ /dev/null @@ -1,73 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.signalr.SignalRManager; -import com.azure.resourcemanager.signalr.models.SignalRUsage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"lmdjrkvfgbvfvpdb\",\"currentValue\":4035946330951713229,\"limit\":6841124205934226974,\"name\":{\"value\":\"lhkrribdeibqipqk\",\"localizedValue\":\"vxndz\"},\"unit\":\"krefajpjo\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SignalRManager manager = - SignalRManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().list("byqunyow", Context.NONE); - - Assertions.assertEquals("lmdjrkvfgbvfvpdb", response.iterator().next().id()); - Assertions.assertEquals(4035946330951713229L, response.iterator().next().currentValue()); - Assertions.assertEquals(6841124205934226974L, response.iterator().next().limit()); - Assertions.assertEquals("lhkrribdeibqipqk", response.iterator().next().name().value()); - Assertions.assertEquals("vxndz", response.iterator().next().name().localizedValue()); - Assertions.assertEquals("krefajpjo", response.iterator().next().unit()); - } -} diff --git a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UserAssignedIdentityPropertyTests.java b/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UserAssignedIdentityPropertyTests.java deleted file mode 100644 index 0ba4bb740811..000000000000 --- a/sdk/signalr/azure-resourcemanager-signalr/src/test/java/com/azure/resourcemanager/signalr/generated/UserAssignedIdentityPropertyTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.signalr.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.signalr.models.UserAssignedIdentityProperty; -import org.junit.jupiter.api.Test; - -public final class UserAssignedIdentityPropertyTests { - @Test - public void testDeserialize() { - UserAssignedIdentityProperty model = - BinaryData - .fromString("{\"principalId\":\"taruoujmkcj\",\"clientId\":\"qytjrybnwjewgd\"}") - .toObject(UserAssignedIdentityProperty.class); - } - - @Test - public void testSerialize() { - UserAssignedIdentityProperty model = new UserAssignedIdentityProperty(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentityProperty.class); - } -}